Files
twosquirrelspress-site/layouts/_default/baseof.html
T
will 3b20b91cb3
deploy / deploy (push) Successful in 6s
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 <noreply@anthropic.com>
2026-08-04 17:59:53 -04:00

65 lines
2.7 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="{{ .Site.Params.description }}">
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<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 }}
{{ $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 }}
</head>
<body>
<a class="skip-link" href="#main-content">Skip to content</a>
<header class="site">
<div class="inner">
{{ $logo := resources.Get "images/logo-white.png" }}
{{ $logoSm := $logo.Resize "480x" }}
<a class="brand" href="/">
<img src="{{ $logoSm.RelPermalink }}" width="{{ $logoSm.Width }}" height="{{ $logoSm.Height }}" alt="{{ .Site.Title }}">
</a>
<nav aria-label="Primary">
{{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
</div>
</header>
<main id="main-content">
{{ block "main" . }}{{ end }}
</main>
<footer class="site">
<div class="inner">
<span>&copy; {{ now.Year }} {{ .Site.Title }}</span>
<nav aria-label="Footer">
{{ range .Site.Menus.footer }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
</div>
</footer>
</body>
</html>