Repository navigation
Link brand.css with a version, and check it in CI - #5
Merged
Merged
Conversation
GitHub Pages lets browsers reuse a file for 10 minutes, so after a deploy a returning visitor could get the new HTML with the old brand.css (the new popover menu then showed as a full-screen box on phones). index.html now links /brand.css?v=<first 10 hex of its sha256>, so a changed stylesheet gets a new URL. The site has no build step, so the version is written by hand; a new Check workflow fails when it doesn't match the file and prints the line to use. Co-Authored-By: Claude Opus 5.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.
GitHub Pages lets a browser reuse a file for 10 minutes. After today's deploy a returning visitor got the new HTML with the old
brand.css, and the new<nav popover>showed as a full-screen box on a phone, because the old.wg-nav { display: flex }beat the browser's hiding of a closed popover.index.htmlnow links/brand.css?v=e093748145, the first 10 hex of the file's sha256, so a changed stylesheet gets a URL no browser has cached. The tracker, the gap wheels page and the docs do the same at build time (wheelgap/tracker#294, wheelgap/wheels#69, and a docs PR).This site has no build step, so I wrote the version by hand. A new Check workflow (pull requests and pushes to main) fails when a page's
?v=doesn't match the file, and prints the exact line to use. It also fails if a page links a stylesheet or script it doesn't know how to check. I ran it locally: it passes now, and it fails with the right line after a one-byte change tobrand.css.brand.cssitself is unchanged and still byte-identical to the other three repos' copies.🤖 Generated with Claude Code