From 874570576872b3c0cefa79c277c46ae36bfdc057 Mon Sep 17 00:00:00 2001 From: Will Estes Date: Tue, 4 Aug 2026 05:38:24 -0400 Subject: [PATCH] Publish a stable stylesheet URL, move bookshop links to /shop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Publishes a second, non-fingerprinted copy of main.css at /css/main.min.css alongside the fingerprinted one the site itself links — same source resource, so bookshop's ARC/download pages (now mounted at thistleandmoth.org/shop, not shop.thistleandmoth.org) can link real, always-current CSS without tracking a hash that changes on every deploy. Updates the two remaining shop.thistleandmoth.org references to the new canonical URL. --- content/free-book/_index.md | 2 +- hugo.toml | 2 +- layouts/_default/baseof.html | 13 +++++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/content/free-book/_index.md b/content/free-book/_index.md index 515a7d8..9e4a809 100644 --- a/content/free-book/_index.md +++ b/content/free-book/_index.md @@ -8,4 +8,4 @@ This page is a stub — the link below won't resolve until the real ARC campaign is created (see reground-tools' `arc-campaign.sh`) and this copy is replaced with the real title/code. -[Get your free ebook](https://shop.thistleandmoth.org/arc/TODO-real-code) +[Get your free ebook](https://thistleandmoth.org/shop/arc/TODO-real-code) diff --git a/hugo.toml b/hugo.toml index 5715d4b..55a0988 100644 --- a/hugo.toml +++ b/hugo.toml @@ -13,7 +13,7 @@ disableKinds = ["taxonomy", "term"] description = "TODO: one-line description of Thistle & Moth" author = "Thistle & Moth" eec_base_url = "https://eec.thistleandmoth.org" - bookshop_base_url = "https://shop.thistleandmoth.org" + bookshop_base_url = "https://thistleandmoth.org/shop" [[menu.main]] name = "Submissions" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7a29dae..bfe669f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -13,8 +13,17 @@ {{ end }} {{ $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 /shop pages) 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 }}