markdown: fix h1 ids for multiple words title and foreign characters #459

This commit is contained in:
Sören Weber 2023-02-01 08:17:48 +01:00
parent 85f2e1344e
commit e57f05f7b4
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
6 changed files with 6 additions and 6 deletions

View file

@ -30,7 +30,7 @@
<main id="body-inner" class="chapter" tabindex="-1">
<div class="flex-block-wrapper">
<article class="default">
<h1 id="{{ T "title-404" | urlize }}">{{ T "title-404" }}</h1>
<h1 id="{{ T "title-404" | anchorize }}">{{ T "title-404" }}</h1>
<p></p>
<p>{{ T "message-404" }}</p>
<p></p>

View file

@ -8,7 +8,7 @@
{{- $title = printf "%s %s " (.Data.Singular | humanize) (default "::" .Site.Params.titleSeparator) }}
{{- end }}
{{- $title = printf "%s%s" $title .Title }}
<h1 id="{{ $title | urlize }}">{{ $title }}</h1>
<h1 id="{{ $title | anchorize }}">{{ $title }}</h1>
<ul>
{{- range .Data.Terms.Alphabetical }}
{{- $len := 0 }}

View file

@ -3,7 +3,7 @@
{{- with $page }}
<article class="chapter">
{{ partial "heading-pre.html" . }}<div class="article-subheading">{{ T "Chapter" .Params.Weight }}</div>
<h1 id="{{ .Title | urlize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
<h1 id="{{ .Title | anchorize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
{{ $content | safeHTML }}
<footer class="footline">

View file

@ -2,7 +2,7 @@
{{- $content := .content }}
{{- with $page }}
<article class="default">
{{ partial "heading-pre.html" . }}<h1 id="{{ .Title | urlize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
{{ partial "heading-pre.html" . }}<h1 id="{{ .Title | anchorize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
{{ $content | safeHTML }}
<footer class="footline">

View file

@ -2,7 +2,7 @@
{{- $content := .content }}
{{- with $page }}
<article class="home">
{{ partial "heading-pre.html" . }}<h1 id="{{ .Title | urlize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
{{ partial "heading-pre.html" . }}<h1 id="{{ .Title | anchorize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
{{ $content | safeHTML }}
<footer class="footline">

View file

@ -1,6 +1,6 @@
{{- $title := T "Search" }}
<article class="default">
<h1 id="{{ $title | urlize }}">{{ $title }}</h1>
<h1 id="{{ $title | anchorize }}">{{ $title }}</h1>
<form action="javascript:triggerSearch()">
<div class="searchform">