Cache-bust site asset links at build time

Table of Contents

This page is a capture in the inbox bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

What

The site build emits plain asset links — <link rel"stylesheet" href="/OreStudio/assets/style.css">= in html-header, the nav-injection in ores-inject-site-nav, and the org-publish pages — with no version token. Append a build-time cache-buster (e.g. style.css?v=<short-sha> from git rev-parse --short HEAD) in ores-build-site.el wherever asset URLs are emitted, so a restyle invalidates browser caches automatically.

Why

After the hierarchical menu landed, a returning browser on the locally served site kept the pre-menu assets/style.css and rendered all dropdowns permanently expanded with bullets — diagnosed as stale CSS cache, fixed only by a hard refresh. GitHub Pages visitors hit the same class of problem after any restyle: HTML revalidates but subresources often do not.

References

See also

Emacs 29.1 (Org mode 9.6.6)