Improve the JSON-LD output and add it to sections and front page as well.

This commit is contained in:
Fredrik Jonsson 2018-03-01 14:29:25 +01:00
commit f25ad69da2

View file

@ -0,0 +1,26 @@
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url" : "{{ .Permalink }}",
"name": {{ .Title | jsonify }},
"description": {{ $.Param "description" | jsonify }},
{{ with $.Param "image" -}}
"image" : "{{ . | absURL }}",
{{ end -}}
{{ with $.Param "author" -}}
"author": {
"@type": "Person",
"name": {{ . | jsonify }}
},
{{ end -}}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ .Site.BaseURL }}"
},
"publisher": {
"@type": "Organization",
"name": {{ .Site.Title | jsonify }},
"url": "{{ .Site.BaseURL }}",
}
</script>