Compare commits

...

2 Commits

Author SHA1 Message Date
David Legrand
cabd024584
Merge f66c915d5b499ba53d8253b99807fe4a4c654e46 into f65aca556dc8e41e3ea64a2144e0c489ca519c77 2024-11-03 19:54:42 +08:00
David Legrand
f66c915d5b 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.
2024-02-27 07:15:57 +01:00

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 -}}