Repository navigation
Docs: cache-bust site assets, README gallery on the hanbok portrait - #16
Merged
Merged
Conversation
GitHub Pages serves docs/assets/ under fixed names with a 10-minute cache, so a browser could pair the new overview page with the old site.css and show the video at its full 1920 px. Pages now link site.css and site.js with a hash of their contents (?v=...), so every change gets a fresh URL. The README's operation gallery (docs/previews/, also used by the operations page) is now generated from the hanbok portrait instead of Gamcheon Culture Village. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lpfz52CucHEw9WyhgzPjmj
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.
Changes
Video showing at full size after deploy
After #15 deployed, the overview page's video could show at its full 1920 px instead of fitting the column.
The live CSS is correct. On the live site the video measures 350 px wide at a 390 px window, 680 px at 1024 and 952 px at 1440, with no horizontal overflow.
The cause is caching. GitHub Pages serves
docs/assets/site.cssandsite.jsunder fixed names withCache-Control: max-age=600. A browser could therefore load the newindex.htmltogether with a cachedsite.cssfrom before the.videorule existed.scripts/docs_layout.pynow links both files with a short hash of their contents, for exampleassets/site.css?v=16ecc1ba1e. Any change to them gets a new URL, so a page and its stylesheet can't get out of step. The hash is computed when the docs are built, so there's nothing to maintain by hand.README sample image
The README's operation gallery is now generated from
docs/photos/hanbok-portrait.jpginstead of Gamcheon Culture Village. That'sdocs/previews/, whichoperations.htmlalso uses. The README markdown itself is unchanged and still matchesgenerate_previews.py --markdown.Checks
python scripts/build_docs.pyrebuilt all five pages. Each one now linkssite.css?v=…andsite.js?v=….docs/locally and loaded it in Chromium at 390, 768, 1024, 1280, 1440 and 1920 px. The video fits the content column every time, and the hashed asset URLs return 200.pytest: 313 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lpfz52CucHEw9WyhgzPjmj
Generated by Claude Code