mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 10:31:39 +01:00
json-schema: add support for multiple authors
This commit is contained in:
parent
5b9eaac130
commit
44bc299ca3
@ -41,13 +41,26 @@
|
|||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
|
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- end}}
|
{{- end -}}
|
||||||
"datePublished": {{ .PublishDate }},
|
"datePublished": {{ .PublishDate }},
|
||||||
"dateModified": {{ .Lastmod }},
|
"dateModified": {{ .Lastmod }},
|
||||||
"author": {
|
{{- with (.Params.author | default .Site.Params.author) }}
|
||||||
|
"author":
|
||||||
|
{{- if (eq (printf "%T" .) "[]string") -}}
|
||||||
|
[{{- range $i, $v := . -}}
|
||||||
|
{{- if $i }}, {{end -}}
|
||||||
|
{
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": {{ .Params.author | default .Site.Params.author }}
|
"name": {{ $v }}
|
||||||
|
}
|
||||||
|
{{- end }}],
|
||||||
|
{{- else -}}
|
||||||
|
{
|
||||||
|
"@type": "Person",
|
||||||
|
"name": {{ . }}
|
||||||
},
|
},
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
"mainEntityOfPage": {
|
"mainEntityOfPage": {
|
||||||
"@type": "WebPage",
|
"@type": "WebPage",
|
||||||
"@id": {{ .Permalink | safeHTML }}
|
"@id": {{ .Permalink | safeHTML }}
|
||||||
|
Loading…
Reference in New Issue
Block a user