feat: add sectionsTitles param

The user can define a per section title in params, used in section pages. If none is defined, the default title is used.
This commit is contained in:
David Legrand 2024-02-27 01:21:18 +01:00
parent 5c7303bee7
commit f66c915d5b

View File

@ -10,6 +10,10 @@
<title>
{{- if .IsHome -}}
{{ .Site.Title -}}
{{ else if eq .Kind "page" -}}
{{ with .Title }}{{ . }} {{ end -}}
{{ $sectionTitle := index .Site.Params.sectionsTitles .Section }}
{{ $sectionTitle | default .Site.Title }}
{{ else -}}
{{ with .Title }}{{ . }} {{ end -}}
{{ .Site.Title -}}