Skip to content

Commit

Permalink
feat: add sectionsTitles param
Browse files Browse the repository at this point in the history
The user can define a per section title in params, used in section pages. If none is defined, the default title is used.
  • Loading branch information
davlgd committed Feb 27, 2024
1 parent 5c7303b commit f66c915
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down

0 comments on commit f66c915

Please sign in to comment.