diff --git a/layouts/partials/seo.html b/layouts/partials/seo.html
index 638018b..a05df8c 100644
--- a/layouts/partials/seo.html
+++ b/layouts/partials/seo.html
@@ -1,11 +1,15 @@
+{{- $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) -}}
+
{{/*=== title ===*/}}
{{ "" | safeHTML }}
{{- with .Site.Title }}
{{- end -}}
-{{- $firstH1 := partial "name.html" . }}
-{{- $title := or .Title $firstH1 $.File.ContentBaseName }}
-{{- $name := or .Params.name (print $title " - " .Site.Title) }}
{{- if .IsHome}}
{{- $name = or .Params.name .Site.Title }}
{{- end }}
@@ -28,8 +32,6 @@
{{- end -}}
{{/*=== image ===*/}}
-{{- $cover := ($.Resources.ByType "image").GetMatch "{*cover*,*thumbnail*,*featured*}" -}}
-{{ $icon := resources.GetMatch (default "" .Site.Params.icon) -}}
{{- $staticIcon := "icon.png" | absURL -}}
{{- with or $cover $icon }}
{{ "" | safeHTML }}
@@ -59,8 +61,8 @@
{{- end -}}
{{/*=== published and updated ===*/}}
-{{ "" | safeHTML -}}
-{{ with .Date }}
+{{- "" | safeHTML }}
+{{ with .Date -}}
{{ end -}}
@@ -69,7 +71,7 @@
{{ end -}}
{{/*=== section and keywords ===*/}}
-{{- "" | safeHTML }}
+{{- "" | safeHTML -}}
{{ with.Params.category -}}
{{- end -}}
@@ -91,7 +93,7 @@
"url": {{ .Site.BaseURL }}
},
"datePublished": {{ .Date.UTC.Format "2006-01-02T03:04:05Z" }},
- "description": {{ or .Description .Summary }},
+ "description": {{ (or .Description .Summary) | plainify }},
"wordCount": {{ .WordCount }},
"mainEntityOfPage": {{.Permalink}},
"dateModified": "{{ .Lastmod.UTC.Format "2006-01-02T03:04:05Z" }}",
@@ -114,14 +116,14 @@
{{ "" | safeHTML }}
{{- end -}}
@@ -140,6 +142,6 @@
{{- end -}}
{{/* robots */}}
-{{- "" | safeHTML }}
+{{ "" | safeHTML }}
\ No newline at end of file