From 5e40156c92f0e3fd60aa1d27a7c911157a7a0792 Mon Sep 17 00:00:00 2001 From: a Date: Tue, 27 Feb 2024 02:57:09 -0600 Subject: [PATCH] more seo --- layouts/partials/seo.html | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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 -}}