diff --git a/layouts/partials/seo.html b/layouts/partials/seo.html index 0f33922..e74b68a 100644 --- a/layouts/partials/seo.html +++ b/layouts/partials/seo.html @@ -1,6 +1,5 @@ {{- $firstH1 := partial "name.html" . }} {{- $title := or .Title $firstH1 $.File.ContentBaseName }} -{{- $name := or .Params.name (print $title " - " .Site.Title) }} {{- $cover := ($.Resources.ByType "image").GetMatch "{*cover*,*thumbnail*,*featured*}" -}} {{ $icon := resources.GetMatch (default "" .Site.Params.icon) -}} @@ -11,11 +10,13 @@ {{- end -}} {{- if .IsHome}} -{{- $name = or .Params.name .Site.Title }} -{{- end }} -{{- with $name }} +{{- with or .Params.name .Site.Title }} {{ . }} +{{- end }} +{{- else }} +{{ or .Params.name (print $title " - " .Site.Title) }} + {{- end -}} {{/*=== description ===*/}} @@ -51,15 +52,13 @@ {{- end -}} -{{/*=== author ===*/}} +{{/*=== article ===*/}} {{ with or .Params.author .Site.Params.author -}} {{ "" | safeHTML }} -{{- end -}} +{{- end }} - -{{/*=== published and updated ===*/}} -{{- "" | safeHTML }} +{{ "" | safeHTML }} {{ with .Date -}} {{ end -}} @@ -68,7 +67,7 @@ {{ end -}} {{/*=== section and keywords ===*/}} -{{- "" | safeHTML -}} +{{- "" | safeHTML }} {{ with.Params.category -}} {{- end -}}