Fixing formatting of ld+json partials for Hugo 0.55.x.

This commit is contained in:
Fredrik Jonsson 2019-05-20 23:09:13 +02:00
commit d6e4835b24

View file

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