Skip to content

Link brand.css with a version, and check it in CI - #5

Merged
patrickballard merged 1 commit into
mainfrom
fix/versioned-brand-css
Nov 29, 2026
Merged

patrickballard merged 1 commit into
mainfrom
fix/versioned-brand-css

Conversation

@patrickballard

Copy link
Copy Markdown
Contributor

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.html now 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 to brand.css.

brand.css itself is unchanged and still byte-identical to the other three repos' copies.

🤖 Generated with Claude Code

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>
@patrickballard
patrickballard merged commit bc9db33 into main Nov 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant