diff --git a/layouts/partials/seo.html b/layouts/partials/seo.html index 052fde5..bc3c53e 100644 --- a/layouts/partials/seo.html +++ b/layouts/partials/seo.html @@ -1,7 +1,11 @@ {{ "" | safeHTML }} -{{ $firstH1 := partial "name.html" . }} -{{ $title := or .Title $firstH1 $.File.ContentBaseName }} +{{- $firstH1 := partial "name.html" . }} +{{- $title := or .Title $firstH1 $.File.ContentBaseName }} +{{- if $title }} {{ $title }} - {{ .Site.Title }} +{{- else }} +{{ .Site.Title }} +{{- end }} @@ -13,7 +17,7 @@ -{{ end -}} +{{ end }} {{ "" | safeHTML }} @@ -55,7 +59,7 @@ {{/*=== published and updated ===*/}} {{ "" | safeHTML }} -{{- with .Date }} +{{ with .Date }} {{ end -}} @@ -79,7 +83,7 @@ { "@context": "http://schema.org", "@type": "Article", - "headline": {{ .Title }}, + "headline": {{ $title }}, "author": { "@type": "Person", "name": "{{ or .Params.author .Site.Params.author }}" @@ -90,15 +94,15 @@ "mainEntityOfPage": "True", "dateModified": "{{ .Lastmod.Format "2006-01-02" }}", "image": { - "@type": "imageObject", + "@type": "ImageObject", "url": "{{ with or .Params.cover $cover $icon }}{{ .Permalink | absURL }}{{ end }}" }, "publisher": { "@type": "Person", "name": "{{ or .Params.author .Site.Params.author .Site.Title }}", "logo": { - "@type": "imageObject", - "url": {{with $icon}}{{.Permalink}}{{else}}{{$staticIcon}}{{end}} + "@type": "ImageObject", + "url": {{with $icon}}{{.Permalink}}{{else}}{{$staticIcon}}{{end}} } } }