Repository navigation
Rebuild the library on Astro, books rewritten in the author's voice - #2
Open
LucianoAdonis wants to merge 8 commits into
Open
LucianoAdonis wants to merge 8 commits into
LucianoAdonis wants to merge 8 commits into
Conversation
The site ran on Jekyll with the leap-day remote theme, jQuery and book metadata kept twice (the _config.yml books array and each page's front matter), which had drifted on ten landing pages. Astro 7.4 with one typed content collection makes each page's front matter the single source and checks it at build: status, shelf, chapter order, plate alt text, dates. build.format 'file' keeps emitting pages/<slug>.html, so every /pages URL shared since 2024 keeps resolving on GitHub Pages, dotted chapter slugs included (the loader gets an explicit id function; the default slugifies chapter-2.5 into chapter-25). Markdown goes through Satteri with dash conversion off, so the build can never mint an em dash. Routes are bare placeholders until the design brief is confirmed. Co-Authored-By: Claude <noreply@anthropic.com>
Convert all 88 pages (83 books, chapters and loose pages, 5 drafts) into src/content/pages with scripts/migrate_from_jekyll.py: front matter mapped to the new schema, 582 headings demoted under the layout's h1, 112 chapter-nav includes and 19 nav-button blocks dropped (the layout builds navigation), 98 images moved into src/assets so Astro compresses them, and the social preview kept at its old /images URL. Every legacy /pages URL is listed in scripts/legacy-urls.txt and still resolves. An independent check compared the visible words of all 88 live pages with the new build: 76 are word-identical and the other 12 are explained (removed nav-button labels, syntax-highlighting token splits, two renders that were broken on the old site and now work). Fix three renders by hand, two of them broken on the old site as well: the lsp-chapter-3 table had a 6-cell delimiter under a 7-cell header, and markdown-chapter-2 showed code samples as live markup, including a raw pre whose comment lines rendered as page headings. The migration script now refuses to run again without --force, since a rerun would erase these fixes. Bake started and revised dates from git history. Communication Tips and The ER Playbook start from their 2024 ancestors (2024-09-02, 2024-10-14), which git does not follow as renames. Add scripts/check-site.mjs (legacy URLs, links and anchors, one h1, raw Markdown in visible text) and scripts/voice-lint.mjs (the VOICE.md rule block). Each was tripped on purpose; voice-lint reports 241 violations before the book pass, 180 of them em dashes. Co-Authored-By: Claude <noreply@anthropic.com>
PRODUCT.md records who the library is for (colleagues sent a link, and the author later), the pocket-paperback direction, anti-references and accessibility targets the owner confirmed on 2026-11-17. VOICE.md is measured from the author's 2024-25 originals (git 7f1e879), not from the 2026 rewrite: contractions by default, "you" over "I" about 2.7 to 1, humor as a plain admission against a solemn setup, Title Case headings, exclamation points within a budget, no em dashes. It outranks AGENTS.md where they disagree, and its lint block drives scripts/voice-lint.mjs. Co-Authored-By: Claude <noreply@anthropic.com>
The book pass tripped two defects in the checks themselves. voice-lint's
exclamation cap counted the "!" of Markdown image syntax, so chapters
with many screenshots failed, and one agent deleted an image to pass (it
was restored). The rule now skips "![". Quoted material that is someone
else's words, like the ChatGPT samples in the Writing book, can sit
between <!-- voice-lint: off --> and <!-- voice-lint: on -->.
check-site scanned inline scripts as markup and reported a template
string, href="${...}", as a broken link on every page. It now strips
script and style contents first. Both were tripped again on purpose
after the change.
Co-Authored-By: Claude <noreply@anthropic.com>
The home page is a shelf of spines grouped by topic. Each book has one hue in its front matter; src/lib/color.ts derives spine, cover and link colors from it and checks every text-on-color pair against WCAG AA at build time (spines 4.6 to 7.6, accents 5.2 or better, both themes). Spine thickness follows the book's word count. A toggle re-shelves everything by last revision, with a bookend between years. A book opens on a cover beside its title page (status, started, revised, length) and a printed-style contents page that keeps the author's own chapter numbers. Superseded books get a "Moved on" box, related ones a quiet line. Chapters get a running head with reading progress, a margin table of contents on wide screens, and a next-chapter card. The Dark Souls book reads by the bonfire in any theme. Alegreya, Alegreya Sans and Alegreya Sans SC are self-hosted through the Astro fonts API. Search is Pagefind in a non-modal popover. Dates come from git: started is baked, revised is the newer of the baked date and the last content commit not listed in .git-blame-ignore-revs. movedTo lets a duplicated page keep its URL and point at the original. Pins astro 7.4.7 (first release with the GHSA-r3h5-4585-7x3w fix) and lucide-static 1.66.0, both older than two weeks. Co-Authored-By: Claude <noreply@anthropic.com>
Rewrite all 88 pages against VOICE.md, which was measured from the author's 2024-25 originals. A workflow of 131 agents rewrote each book on Sonnet, then checked it through three independent reviews (mechanical, fidelity to the author's sources, voice) with fix-and-recheck rounds; every unit ended clean. A second pass of 56 agents restored the 2026 sections the first pass had dropped from 13 pages (the owner's call), rewritten in the author's register and marked <!-- source: 2026 batch (8126bde), restored --> (94 blocks). What changed for readers: - Contractions, the author's "you" and "I", and the jokes the 2026 rewrite removed are back. Em dashes went from 180 to 0, and voice-lint from 241 violations to 0. - Superseded books keep the essay and link out: Shopping keeps the verdicts and useful sites (catalog on BuyHacks), Troubleshooting keeps the stories (method in the Incident Runbook), Tech Manager keeps the multiplayer design (solo version is Rush Q Cards). - Chapter titles are distinct (Confluence x5, Interviews x6 and Core Five x2 had collapsed), chapter quips moved from the old overview lists into descriptions, and all 136 alt texts describe their image. - Fixed 7 dead anchors, 2 links to chapters that never existed and 5 images that were never in the repo. Airtable chapter 4 was a copy of Confluence chapter 4 and now points there. - Status ratings re-rated honestly; book statuses match their chapters. Text with no source anywhere is wrapped in data-review="new" (47 places: placeholders for unfinished sections, cross-links, hedges) and shows highlighted in `npm run dev` for the author to keep or cut. Co-Authored-By: Claude <noreply@anthropic.com>
Remove the leap-day theme overrides, layouts, includes, jQuery-era scripts, Gemfiles, the original pages/ and the 66 MB images/ folder. Everything still referenced lives in src/ or public/; check-site confirms every legacy URL resolves and nothing points at an old path. .github/workflows/deploy.yml builds on Node 24 with full git history (revised dates come from it), runs astro check, the voice lint, the build with its search index and check-site, then publishes dist/ to GitHub Pages. Pull requests get the checks without the deploy. The repository's Pages source has to be switched to GitHub Actions before the first deploy, or GitHub will try to build this repo with Jekyll. The Makefile keeps `make local` and `make run`, adds build, preview and check, and rewrites new-book and new-chapter for the new front matter (both round-tripped through astro check). CLAUDE.md, AGENTS.md, README and CONTRIBUTING describe the Astro site; AGENTS.md drops the three rules the author's own writing never followed and defers to VOICE.md. DESIGN.md records the visual system. Co-Authored-By: Claude <noreply@anthropic.com>
…opy) Four reviewers (accessibility with axe-core and keyboard walkthroughs, visual against the confirmed brief, performance, interface copy) found 39 problems; 34 survived a skeptic per finding. All 34 are fixed: - Spine slips met WCAG 1.4.13: they open beside the spine instead of over the toolbar, stay open while the pointer moves onto them, and close on Escape. Spine titles now clear 4.6:1 over the highlight band too, not only over the flat face. - Search uses Cmd+K or Ctrl+K instead of "/" (WCAG 2.1.4), focuses the field synchronously, shares one Pagefind initialization (fast typing hit a half-initialized engine), hides results that only match a stray letter, announces result counts, closes on Escape and returns focus. - A light-only inline style on Confluence 3 failed contrast at 2.21:1; the copy button announces through a status region; table regions are named after their section; the skip link moves focus. - The reading column was ~85 characters wide (ch is Alegreya's wide 0); it is 34rem, about 66. Book pages put facts, contents and text on one edge beside a sticky cover. Short shelves share a row like a bookcase, seven spines fit a phone row, the year bookend stands upright, cover titles fit their cover, the margin contents list clears the gutter. - The four GIF screen recordings are MP4s with controls (15 to 57 KB instead of up to 391 KB, and no endless loop without a pause); body images get a srcset capped at 1280 px; the Dark Souls title screen is an eager frontispiece; Alegreya Sans 500 is no longer loaded. - Copy: "1 chapter", "Unlisted" for drafts, "On this page" on loose pages, readable search errors, visible status definitions and a feedback link, the running head shows only the author's chapter label. Found while verifying the fixes: the glyph component stripped width and height from every element, so icons drawn with <rect> (lock, table, dice) were missing parts; it now rewrites only the root <svg>. Every fix was re-checked by a Playwright script (23 checks, 0 failing over repeated runs) and axe reports no WCAG 2.2 AA violations on 10 pages in both themes. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
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.
Rebuilds Luciano's Library on Astro 7 and rewrites every mini-book in the author's own voice, measured from the 2024-25 originals.
Before merging
.forge/refine/REVIEW.md, not in the repo): 47 new passages, highlighted when you runmake dev; 94 restored 2026 sections; 58 questions left by the book pass.What changed
The site ("pocket paperbacks")
/pages/still resolves (scripts/legacy-urls.txt, enforced bycheck-site).The books
VOICE.md: contractions, Title Case headings and the jokes the 2026 rewrite removed are back. Em dashes went from 180 to 0, and all 136 images got real alt text.<!-- source: 2026 batch (8126bde), restored -->.data-review="new"for the author to keep or cut.Checks and deploy
.github/workflows/deploy.yml: typecheck, voice lint, build with the search index, thencheck-site, then publish. Pull requests run the checks without deploying.make checkruns the same locally.CLAUDE.md,AGENTS.md,DESIGN.mdandPRODUCT.mddescribe the new site.Verification
astro check: 0 errors.voice-lint: 0 violations over 88 pages.check-site: 0 findings over 90 pages and 90 legacy URLs.Not verified
/images/...URLs, other than the social preview and the inline peek images, no longer resolve. Every page URL does.