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

@ -6,14 +6,17 @@
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}",
"url" : "{{ .Permalink }}",
"description": {{ with (replaceRE "\n" " " (.Description | default .Summary)) }}{{ . | jsonify }}{{ end }},
"description": {{ with (replaceRE "\n" " " (.Description | default .Summary)) }}{{ . | jsonify }}{{ end }},
{{ with $.Param "image" -}}
"image" : "{{ . | absURL }}",
{{ end -}}
{{ with .Params.tags -}}
"keywords": {{ . | jsonify }},
{{ end -}}
{{ with $.Param "author" -}}
"author": {
"@type": "Person",
"name": "{{ . }}"
"name": {{ . | jsonify }}
},
{{ end -}}
"mainEntityOfPage": {
@ -22,7 +25,7 @@
},
"publisher": {
"@type": "Organization",
"name": "{{ .Site.Title }}",
"name": {{ .Site.Title | jsonify }},
"url": "{{ .Site.BaseURL }}",
}
}