Skip to content

Commit 94c1fbd

Browse files
committed
feat: add SectionTitles parameter
The user can define a per section title in params, used in section pages. If none is defined, the default title is used.
1 parent 5c7303b commit 94c1fbd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

layouts/partials/head.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<title>
1111
{{- if .IsHome -}}
1212
{{ .Site.Title -}}
13+
{{ else if eq .Kind "page" - }}
14+
{{ with .Title }}{{ . }} – {{ end -}}
15+
{{ $sectionTitle := index .Site.Params.sectionsTitles .Section }}
16+
{{ $sectionTitle | default .Site.Title }}
1317
{{ else -}}
1418
{{ with .Title }}{{ . }} – {{ end -}}
1519
{{ .Site.Title -}}

0 commit comments

Comments
 (0)