diff --git a/layouts/partials/data/title b/layouts/partials/data/title new file mode 100644 index 0000000..dd70e01 --- /dev/null +++ b/layouts/partials/data/title @@ -0,0 +1,17 @@ +{{- $title := .Title -}} +{{- $siteTitle := .Site.Title -}} +{{- $authorName := .Site.Author.name -}} +{{- $sep := ( .Site.Params.SEO.titleSeparator | default "•" ) -}} +{{- if .IsHome -}} + {{ $siteTitle }} +{{- else if eq .Kind "taxonomy" -}} + {{ title .Data.Singular }}: {{ $title }} {{ $sep }} {{ $siteTitle }} +{{- else if ( or .IsNode ( eq .Section "page" ) ) -}} + {{ $title }} {{ $sep }} {{ $siteTitle }} +{{- else -}} + {{- with $authorName -}} + {{ $title }} {{ $sep }} {{ . }} + {{- else -}} + {{ $title }} {{ $sep }} {{ $siteTitle }} + {{- end -}} +{{- end -}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 712909a..ba7a2d4 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,13 +1,21 @@
-