mirror of
https://github.com/imfing/hextra.git
synced 2025-05-12 23:46:45 -04:00
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:
parent
5c7303bee7
commit
f66c915d5b
@ -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 -}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user