Add logo to publisher JSON-LD.

This commit is contained in:
Fredrik Jonsson 2019-06-04 20:53:48 +02:00
commit 23f53a6ba7
3 changed files with 15 additions and 3 deletions

View file

@ -148,7 +148,7 @@ params:
favicon: "" # Relative path to favicon in json feed, no leading slash.
feedlinks: true # Show feed links in the footer.
footer: "A [example.org](https://example.org/) production."
icon: "" # Relative path to icon in json feed, no leading slash.
icon: "" # Relative path to icon in json feed and JSON-LD, no leading slash.
image: "" # Relative path to site image in JSON-LD, no leading slash.
imageMaxWidth: "" # Max width for images added via figure shortcode.
jquery: true # Add jQuery

View file

@ -23,7 +23,13 @@
"publisher": {
"@type": "Organization",
"name": {{ .Site.Title }},
"url": {{ .Site.BaseURL }}
"url": {{ .Site.BaseURL }},
{{ with $.Param "icon" -}}
"logo" : {
"@type": "ImageObject",
"url": {{ . | absURL }}
}
{{ end -}}
}
}
</script>

View file

@ -26,7 +26,13 @@
"publisher": {
"@type": "Organization",
"name": {{ .Site.Title }},
"url": {{ .Site.BaseURL }}
"url": {{ .Site.BaseURL }},
{{ with $.Param "icon" -}}
"logo" : {
"@type": "ImageObject",
"url": {{ . | absURL }}
}
{{ end -}}
}
}
</script>