Files
thistleandmoth-site/layouts/_default/baseof.html
T
will 8745705768
deploy / deploy (push) Successful in 6s
Publish a stable stylesheet URL, move bookshop links to /shop
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.
2026-08-04 05:38:24 -04:00

57 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.Language.LanguageCode | default "en" }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} · {{ .Site.Title }}{{ end }}</title>
<meta name="description" content="{{ .Description | default .Site.Params.description }}">
{{ with .Params.social_image | default .Params.cover_image }}
<meta property="og:title" content="{{ $.Title }}">
<meta property="og:description" content="{{ $.Description | default $.Site.Params.description }}">
<meta property="og:image" content="{{ . }}">
<meta name="twitter:card" content="summary_large_image">
{{ end }}
{{ $css := resources.Get "css/main.css" }}
{{ if hugo.IsProduction }}
{{ $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 /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 <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 }}
</head>
<body>
<a class="skip-link" href="#main-content">Skip to content</a>
<header class="site-header">
<a class="site-title" href="/">{{ .Site.Title }}</a>
<nav aria-label="Primary">
{{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
</header>
<main id="main-content">
{{ block "main" . }}{{ end }}
</main>
<footer class="site-footer">
<span>&copy; {{ now.Year }} {{ .Site.Title }}</span>
<nav aria-label="Footer">
{{ range .Site.Menus.footer }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
</footer>
</body>
</html>