From c7435b476b5e29d66443c8e6461ef0d7e1d5ed53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 13 Nov 2022 22:33:55 +0100 Subject: [PATCH] theme: add id to h1 elements #384 --- layouts/404.html | 2 +- layouts/partials/_taxonomy.html | 7 ++++++- layouts/partials/archetypes/chapter/article.html | 2 +- layouts/partials/archetypes/default/article.html | 2 +- layouts/partials/archetypes/home/article.html | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index ff4b35ba12..d54c7c403b 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -30,7 +30,7 @@
-

{{ T "title-404" }}

+

{{ T "title-404" }}

{{ T "message-404" }}

diff --git a/layouts/partials/_taxonomy.html b/layouts/partials/_taxonomy.html index e16aafc714..9514005690 100644 --- a/layouts/partials/_taxonomy.html +++ b/layouts/partials/_taxonomy.html @@ -3,7 +3,12 @@
{{- $page := . }} -

{{ if eq .Kind "term" }}{{ .Data.Singular | humanize }} {{ default "::" .Site.Params.titleSeparator }} {{ end }}{{ .Title }}

+{{- $title := "" }} +{{- if eq .Kind "term" }} + {{- $title = printf "%s %s " (.Data.Singular | humanize) (default "::" .Site.Params.titleSeparator) }} +{{- end }} +{{- $title = printf "%s%s" $title .Title }} +

{{ $title }}

    {{- range .Data.Terms.Alphabetical }} {{- $len := 0 }} diff --git a/layouts/partials/archetypes/chapter/article.html b/layouts/partials/archetypes/chapter/article.html index 9c9ce89d78..3db3a7d144 100644 --- a/layouts/partials/archetypes/chapter/article.html +++ b/layouts/partials/archetypes/chapter/article.html @@ -3,7 +3,7 @@ {{- with $page }}
    {{ partial "heading-pre.html" . }}
    {{ T "Chapter" .Params.Weight }}
    -

    {{ .Title }}

    {{ partial "heading-post.html" . }} +

    {{ .Title }}

    {{ partial "heading-post.html" . }} {{ $content | safeHTML }}