mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-10-01 01:06:14 -04:00
json-schema: add support for multiple authors
This commit is contained in:
parent
5b9eaac130
commit
44bc299ca3
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user