docs: per-example detail pages in the gallery#42
Merged
Conversation
Each example now gets docs/gallery/<name>/index.html: the hero render with a click-to-zoom lightbox, the witnesses callout, a copyable run-it-yourself command, the README rendered inline (relative links resolve to GitHub), and the full Python source syntax-highlighted at build time via stdlib tokenize — no new dependencies, the stdlib-only rule for build_gallery.py holds. The gallery index gains topic filter chips driven by an additive tags field in gallery.json, and cards now link to the detail pages instead of straight to GitHub. pages.yml rebuilds on any examples/** change so embedded source and READMEs can never drift. 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.
Summary
Phase 3 of the site upgrade — the gallery becomes a destination instead of a link farm.
gallery/<name>/per example: hero with click-to-zoom lightbox (ESC closes), witnesses callout, copyable canonical run command, README rendered inline (headings, lists, bold, inline code, fenced blocks; relative links resolve to GitHub), and the full Python source syntax-highlighted at build time with stdlibtokenize— no Pygments, no Jinja; the stdlib-only rule holds.tagsfield ingallery.json(schema change is additive-only per its_commentcontract).pages.ymlnow triggers onexamples/**so embedded source/READMEs rebuild on change.Testing
Built locally and drove it in a browser: all 4 detail pages render (README markdown clean, no stray markup outside code blocks), lightbox opens and ESC-closes, chips filter correctly (
animation→ turntable only, All resets to 4), cards navigate to detail pages, theme toggle carries across pages via the shared localStorage key.🤖 Generated with Claude Code