feat(jsonld): add publisher to article metadata

Forms part of the transition from Microdata to JSON-LD.

Close #413
This commit is contained in:
George Cushen committed 2019-09-11 17:47:28 +01:00
1 parent c163931702
commit 874a013b79
1 file changed
+11
+11
View File
@@ -22,6 +22,9 @@
{{ $author = .Params.name | default .Title }}
{{ end }}
{{ $publisher := site.Params.org_name | default site.Title }}
{{ $logo_url := printf "img/%s" (site.Params.logo | default "icon-512.png") | absURL }}
<script type="application/ld+json">
{
"@context": "https://schema.org",
@@ -44,6 +47,14 @@
"name": {{.}}
},
{{end}}
"publisher": {
"@type": "Organization",
"name": {{$publisher}},
"logo": {
"@type": "ImageObject",
"url": {{$logo_url}}
}
},
"description": {{$summary}}
}
</script>