mirror of
https://github.com/imfing/hextra.git
synced 2025-05-13 09:06:26 -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>
|
<title>
|
||||||
{{- if .IsHome -}}
|
{{- if .IsHome -}}
|
||||||
{{ .Site.Title -}}
|
{{ .Site.Title -}}
|
||||||
|
{{ else if eq .Kind "page" -}}
|
||||||
|
{{ with .Title }}{{ . }} – {{ end -}}
|
||||||
|
{{ $sectionTitle := index .Site.Params.sectionsTitles .Section }}
|
||||||
|
{{ $sectionTitle | default .Site.Title }}
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
{{ with .Title }}{{ . }} – {{ end -}}
|
{{ with .Title }}{{ . }} – {{ end -}}
|
||||||
{{ .Site.Title -}}
|
{{ .Site.Title -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user