summaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/templates/schema_json.html19
1 files changed, 16 insertions, 3 deletions
diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html
index a186603..ff84c97 100644
--- a/layouts/partials/templates/schema_json.html
+++ b/layouts/partials/templates/schema_json.html
@@ -41,13 +41,26 @@
{{- else -}}
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
{{- end}}
- {{- end}}
+ {{- end -}}
"datePublished": {{ .PublishDate }},
"dateModified": {{ .Lastmod }},
- "author": {
+ {{- with (.Params.author | default .Site.Params.author) }}
+ "author":
+ {{- if (eq (printf "%T" .) "[]string") -}}
+ [{{- range $i, $v := . -}}
+ {{- if $i }}, {{end -}}
+ {
"@type": "Person",
- "name": {{ .Params.author | default .Site.Params.author }}
+ "name": {{ $v }}
+ }
+ {{- end }}],
+ {{- else -}}
+ {
+ "@type": "Person",
+ "name": {{ . }}
},
+ {{- end -}}
+ {{- end }}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": {{ .Permalink | safeHTML }}