Skip to content

Fix broken CSS cache busting - #5

Merged
alexchen4ai merged 1 commit into
mainfrom
fix-css-cache-busting
Aug 1, 2026
Merged

Fix broken CSS cache busting#5
alexchen4ai merged 1 commit into
mainfrom
fix-css-cache-busting

Conversation

@alexchen4ai

Copy link
Copy Markdown
Owner

Summary

  • main.css was always served with ?v=d41d8cd98f00b204e9800998ecf8427e (the md5 of an empty string) because the bust_css_cache filter from jekyll-cache-bust hashes assets/_sass/, which does not exist in this repo (Sass lives in _sass/)
  • Browsers therefore kept using stale cached stylesheets after every deploy — e.g. the unreadable hero subtitle in light mode reported today
  • Add a small plugin overriding the filter to hash _sass/**/*.scss, assets/css/**/*.scss, and _config.yml, so the version changes whenever styles change

Test plan

  • main.css?v= now carries a real content hash
  • Hash changes when a Sass partial changes and build passes

Made with Cursor

bust_css_cache hashed the non-existent assets/_sass directory, always
yielding md5 of the empty string, so browsers never picked up new CSS
after deploys. Override the filter to hash _sass/ and assets/css/.

Co-authored-by: Cursor <cursoragent@cursor.com>
@alexchen4ai
alexchen4ai merged commit 10ac518 into main Aug 1, 2026
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