mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 02:14:21 +00:00
feat(jsonld): add publisher to article metadata
Forms part of the transition from Microdata to JSON-LD. Close #413
This commit is contained in:
1 parent
c163931702
commit
874a013b79
1 file changed
+11
@@ -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>
|
||||
Reference in new issue
Block a user