mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-31 03:45:24 +01:00 
			
		
		
		
	json-schema: add support for multiple authors
This commit is contained in:
		| @@ -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 }} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange