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 }}