Skip to content

[Docs] Version the stylesheet URL by its content - #62

Merged
lcy-seso merged 1 commit into
tile-ai:mainfrom
lcy-seso:css-cache-bust
Oct 2, 2026
Merged

lcy-seso merged 1 commit into
tile-ai:mainfrom
lcy-seso:css-cache-bust

Conversation

@lcy-seso

@lcy-seso lcy-seso commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Problems

Changes

  • hooks.py appends a hash of each local stylesheet's content to its extra_css URL in on_config, e.g. assets/extra.css?v=93090c7963, so the URL changes whenever the styles do. Entries that already carry a query or are not local files are left alone.
  • CLAUDE.md records that the hook versions the URL, so no one adds ?v= by hand.
  • mkdocs build reports only griffe: warnings; the English and Chinese pages both link the versioned URL. pytest and ruff pass.

GitHub Pages serves assets/extra.css under the same URL whatever it contains,
so a browser that cached an older copy keeps it and renders new markup without
the styles that go with it: the User Guide cards showed as plain headings and
lists. hooks.py now appends a hash of the stylesheet's content to its URL, so
the URL changes whenever the styles do.
Copilot AI balanced review requested due to automatic review settings October 2, 2026 05:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@lcy-seso
lcy-seso merged commit 55b8236 into tile-ai:main Oct 2, 2026
3 checks passed
@lcy-seso
lcy-seso deleted the css-cache-bust branch October 2, 2026 05:21
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.

2 participants