Publish a stable, non-fingerprinted stylesheet copy for bookshop
deploy / deploy (push) Successful in 6s

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 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 17:59:53 -04:00
parent 6018a1f32d
commit 3b20b91cb3
+12 -2
View File
@@ -12,8 +12,18 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Lato:wght@400;600;700&family=Dancing+Script&display=swap">
{{ $css := resources.Get "css/main.css" }}
{{ if hugo.IsProduction }}
{{ $css = $css | minify | fingerprint }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
{{ $cssFingerprinted := $css | minify | fingerprint }}
<link rel="stylesheet" href="{{ $cssFingerprinted.RelPermalink }}" integrity="{{ $cssFingerprinted.Data.Integrity }}">
{{/* 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 <head>
gets moved into <body> by the HTML parser, so this has to sit
inside a comment. */}}
<!-- stable stylesheet copy: {{ ($css | minify).RelPermalink }} -->
{{ else }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{ end }}