From e090fc89c022b7e244f98efb25dcd5f3244c09d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 30 Sep 2023 21:45:39 +0200 Subject: [PATCH] theme: fix id generation for markdownified titles #657 --- exampleSite/layouts/partials/toc.html | 2 +- layouts/404.html | 2 +- layouts/_default/taxonomy.html | 4 ++-- layouts/_default/term.html | 2 +- layouts/partials/archetypes/chapter/article.html | 2 +- layouts/partials/archetypes/default/article.html | 2 +- layouts/partials/archetypes/home/article.html | 2 +- layouts/partials/body.searchpage.html | 2 +- layouts/partials/content-footer.html | 2 +- layouts/partials/initial.html | 2 +- layouts/partials/shortcodes/tabs.html | 6 +++--- layouts/partials/tags.html | 2 +- layouts/partials/toc.html | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/exampleSite/layouts/partials/toc.html b/exampleSite/layouts/partials/toc.html index c4f9a5e527..b9bb92d5c4 100644 --- a/exampleSite/layouts/partials/toc.html +++ b/exampleSite/layouts/partials/toc.html @@ -5,7 +5,7 @@ {{- range .Data.Terms.Alphabetical }} {{- $capital := substr .Page.Title 0 1 | upper }} {{- if ne $lastCapital $capital }} -
  • {{ $capital }}
  • +
  • {{ $capital }}
  • {{- end }} {{- $lastCapital = $capital }} {{- end }} diff --git a/layouts/404.html b/layouts/404.html index 9a870650f9..7391ba39d5 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -67,7 +67,7 @@

    4{{ partial "shortcodes/icon.html" (dict "page" . "icon" "far fa-frown" )}}4

    -

    {{ T "title-404" }}

    +

    {{ T "title-404" }}

    {{ T "message-404" }}

    diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 7186e82301..ef47290246 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -9,7 +9,7 @@ {{- if not $title }} {{- $title = .Data.Plural }} {{- end }} -

    {{ $title }}

    +

    {{ $title }}

    {{- $lastCapital := "" }} {{- range .Data.Terms.Alphabetical }} {{- $capital := substr .Page.Title 0 1 | upper }} @@ -17,7 +17,7 @@ {{- if ne $lastCapital "" }} {{- end }} -

    {{ $capital }}

    +

    {{ $capital }}

      {{- end }} {{- $c:=""}}{{/* display terms of a taxonomy */}} diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 0f59b55adc..3688c58557 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -10,7 +10,7 @@ {{- $title = .Data.Singular }} {{- end }} {{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) .Title }} -

      {{ $title }}

      +

      {{ $title }}

        {{- range sort .Pages "Title" }} {{- $c:=""}}{{/* display pages of a term */}} diff --git a/layouts/partials/archetypes/chapter/article.html b/layouts/partials/archetypes/chapter/article.html index d391efaea6..a36d250bf5 100644 --- a/layouts/partials/archetypes/chapter/article.html +++ b/layouts/partials/archetypes/chapter/article.html @@ -6,7 +6,7 @@ {{- partial "content-header.html" . }} {{ partial "heading-pre.html" . }}
        {{ T "Chapter" .Params.Weight }}
        -

        {{ .Title }}

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

        {{ .Title }}

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