fix: doc title

This commit is contained in:
Matthieu Bessat 2024-03-15 08:32:11 +01:00
parent fc9627506f
commit f01da2fe95
3 changed files with 4 additions and 8 deletions

View file

@ -2,8 +2,6 @@
{{- $siteTitle := .Site.Title -}}
{{- if .IsHome -}}
<!-- Homepage, and it's pagination -->
<!-- Build paginator -->
{{ $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
@ -12,9 +10,7 @@
{{ if .Paginator.HasPrev }}
<!-- Paginated. Append page number to title -->
{{ $title = printf "%s - %s" .Paginator $siteTitle }}
{{ else }}
{{ $title = $siteTitle}}
{{ $title = printf "%s" .Paginator }}
{{ end }}
{{- else if eq .Kind "term" -}}
<!-- Taxonomy page -->
@ -31,9 +27,8 @@
{{ $title = $title | append " - " .Paginator }}
{{ end }}
{{ $title = $title | append " - " $siteTitle }}
{{ $title = delimit $title "" }}
{{- end -}}
{{ $title = printf "%s - %s" $title $siteTitle }}
{{ return $title }}