From 3b20b91cb316a8cc4e1533f1b84e93242d5fb4b2 Mon Sep 17 00:00:00 2001 From: Will Estes Date: Tue, 4 Aug 2026 17:59:53 -0400 Subject: [PATCH] Publish a stable, non-fingerprinted stylesheet copy for bookshop Mirrors thistleandmoth-site's baseof.html: the fingerprinted stylesheet link changes hash on every deploy, so it can't be hardcoded as BRAND_SITE_STYLESHEET_URL for bookshop's pages to link. Publishes the same source at a stable /css/main.min.css URL alongside it. Co-Authored-By: Claude Sonnet 5 --- layouts/_default/baseof.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c62c849..9ade5a5 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,8 +12,18 @@ {{ $css := resources.Get "css/main.css" }} {{ if hugo.IsProduction }} - {{ $css = $css | minify | fingerprint }} - + {{ $cssFingerprinted := $css | minify | fingerprint }} + + {{/* Also publish the same source at a second, stable, non-fingerprinted + URL — the fingerprinted one above changes hash on every deploy, so + it's unusable as a link target for an external same-origin + consumer (bookshop's pages, via BRAND_SITE_STYLESHEET_URL) that + can't track that hash. Referencing .RelPermalink is what makes + Hugo actually publish this resource; nothing else in this + template links it. Stray non-whitespace text directly in + gets moved into by the HTML parser, so this has to sit + inside a comment. */}} + {{ else }} {{ end }}