Website scaffolding: portable site config, unified template, coherent URLs - #135
Open
saulbert wants to merge 3 commits into
Open
Website scaffolding: portable site config, unified template, coherent URLs#135saulbert wants to merge 3 commits into
saulbert wants to merge 3 commits into
Conversation
SITE_NAME/CONTACT_EMAIL/SITE_ATTRIBUTION env vars (defaults unchanged) so rebrand/staging is config-only. wwwify.py now wraps xdfile/html.py instead of duplicating it, giving prose pages the navbar; HTML5 doctype + UTF-8; nav highlighting wired up in both write_html paths; dropdown parent anchor restored (Words/Clues were unreachable). Lazy corpus/queries imports keep the template layer light. Pyright cleanups in utils.py. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Front page is now prose (www/index.md, finally built); the pubyear grid map moves to /pub/ and gains per-publication index pages /pub/<pubid>/ (closes century-arcade#83, closes century-arcade#49). Clue pages move from /pub/clue/ to /clue/, mirroring /word/ and keeping /pub/ progressive: /pub/ -> /pub/nyt -> /pub/nyt1994 -> /pub/nyt1994-01-01. Prose pages build in directory form. Generated 404 page. Old paths all 301 via _redirects. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
_redirects covers S3-era paths (/xdiffs, /logs, /pubs, old zips), the /pub/clue -> /clue move, /doc -> GitHub spec until /format/ exists, and absorbs gxd/redirects.tsv. bots.ts missing paren fixed (was blocking deploy). robots.txt now only disallows the ephemeral /pub/deep/ pages. error.html (S3 ErrorDocument) replaced by generated 404.html. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Phase 3 (website) kickoff: the scaffolding + glue layer that the rebrand sits on. Closes #83, closes #49.
What this does
Portability (the rebrand becomes a config change):
SITE_NAME,CONTACT_EMAIL,SITE_ATTRIBUTION— with defaults identical to today, so a redeploy of xd.saul.pw from master is brand-identical, and the staging site gets the new name purely via Netlify env settings.scripts/wwwify.pynow wrapsxdfile/html.pyinstead of duplicating it. Prose pages get the navbar (it was commented out); HTML5 doctype + UTF-8 replace XHTML 1.0/ISO-8859-1 (output was already pure-ASCII entities, so this is declaration-only).URL scheme (full inventory + strategy analysis behind these choices is summarized below):
www/index.md(never built before — the live front page was the raw pubyear grid)./pub/, which doubles as the publications index; new per-publication pages at/pub/<pubid>/mean the map's links stop 404ing./pub/reads progressively:/pub/→/pub/nyt→/pub/nyt1994→/pub/nyt1994-01-01./pub/clue/→/clue/, mirroring/word/(clues aren't publication-scoped;/pub/cluebroke the progressive scheme)./about/index.html) — immune to/aboutvs/about/ambiguity./wordsand/clues, which have never matched what the generators write. Also fixed: the "Most Popular" dropdown had no parent anchor, so Words/Clues were unreachable by hover.Nothing breaks (hard requirement): every URL that works today — and the S3-era inbound ones that 404 today — keeps working via real page or
_redirects301:/words//clues,/pub/clue/*,/xdiffs/*,/logs/*,/pubs/*, old zips,/doc/*(→ GitHub spec until a/format/page exists), plus the two Google-Sheets redirects absorbed fromgxd/redirects.tsv.Deploy unblockers:
bots.tssyntax error fixed (missing paren — blocked deploys);robots.txtno longer disallows all of/pub(only the ephemeral/pub/deep/); proper Netlify404.htmlreplaces the S3-eraerror.html.Verified
xdfile/tests/test_html.py); pyright clean on all touched files.make website-static+37-pubyear-svg.py(full nyt run) +34-mkwww-clues.pyagainst the local gxd corpus: per-pub pages exist for every link the map emits, clue pages land in/clue/, prose front page survives the fullwebsitetarget.SITE_NAME='The Cross Reference' make website-staticrenames the site end-to-end with zero code change.Open questions surfaced by the URL audit (not blocking, future tasks)
/clue/<bc>beyond top-200 and/pub/deep/<xdid>pages only exist for last-day puzzles, and each atomic Netlify deploy deletes yesterday's. Generation-policy decision needed./word/is capped at top-100 answers — expand?xd-puzzles.zipis linked from/data/but its build line is commented out (Makefile:55) — restore or unlink.[this message written by Claude Fable 5 and approved by @saulpw]