From 4f22a1ee6092762ee116dc09b3cea66b181e3efffe22eb56037c6e41b11757d8 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson <> Date: Fri, 18 Sep 2026 00:00:00 +0000 Subject: Fix entry heading anchors on page bundles The heading id came from .File.TranslationBaseName, which is "index" for every leaf bundle. Since audio versions require an entry to be a bundle, every entry with audio got the same meaningless anchor, and pages built by a content adapter would have taken the name of the directory holding the adapter. Derive the id from the page's own URL instead. Single file entries keep the anchors they already had, and bundles, adapter built pages and custom slugs now each get their own. Co-Authored-By: Claude Opus 5 --- layouts/single.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/single.html b/layouts/single.html index e7522a0..9ea21f4 100644 --- a/layouts/single.html +++ b/layouts/single.html @@ -3,8 +3,11 @@

{{ emojify ":link:" }} {{ i18n "returnHome" }}

+ {{/* derived from the page's own URL so that it is stable and unique for + single files, page bundles and pages built by a content adapter alike */ -}} + {{ $headingID := path.Base .RelPermalink | strings.TrimSuffix ".html" -}}
-

{{ .Title }}

+

{{ .Title }}

{{- if (.Page.Params.pageinfo | default true) }}

{{ partial "pageinfo.html" . }}

{{- end -}} -- cgit v1.2.3