Fix build script dropping insights thumbnails and article links#50
Merged
Conversation
scripts/generate-site.py's INSIGHTS_ARTICLES data never carried the per-article thumbnail image or slug that recent commits (b525494, 988d927) hand-patched directly into site/insights.html. Any rebuild (make build, or CI) silently regenerated insights.html without the images and pointed every "Read" link at /contact.html instead of the actual report page - a regression that reappeared every time the generator ran. Root cause: content was patched into the generated HTML output directly instead of into the generator's source data, so the two drifted. Fixed by adding slug/image/alt fields to INSIGHTS_ARTICLES and rendering them in insights_main(), making the generator the single source of truth again. Own every bug you see: this rebuild also carries forward an already-pending footer copy tweak that was present in the shared chrome template source but never baked into the committed HTML, plus a same-day sitemap.xml lastmod refresh - both are side effects of running a full, correct rebuild rather than a hand-patch. Verified: the build is idempotent (a second run produces no diff), and the CI link-checker's internal-link scan passes with zero missing links. Signed-off-by: chellej <197998703+chellej@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/generate-site.py'sINSIGHTS_ARTICLESdata never carried the per-article thumbnail image or destination slug that were hand-patched directly intosite/insights.htmlin Use new insights thumbnails #48/Add story card thumbnail images to insights page #49. Any rebuild (make build, or the CIGenerate sitestep) silently regeneratedinsights.htmlwithout the thumbnails and pointed every "Read" link at/contact.htmlinstead of the actual report page.slug,image, andimage_altfields toINSIGHTS_ARTICLESand rendering them ininsights_main(), so the generator is the single source of truth again and a rebuild can no longer regress this content.sitemap.xmllastmod refresh. Both are inherent side effects of running a full, correct rebuild.Root cause
Content was patched into generated HTML output directly instead of into the generator's source data, so the two drifted silently. The fix moves the data back into the generator so
site/*.htmlis once again fully reproducible fromscripts/generate-site.py.Test plan
python3 scripts/generate-site.pyruns clean, writes 37 filessite/insights.html- thumbnails and article links now match exactlysite/- 0 missing linkspython3 -m py_compile scripts/generate-site.py