Fixing formatting of ld+json partials for Hugo 0.55.x.
This commit is contained in:
parent
0be618650c
commit
d6e4835b24
2 changed files with 19 additions and 19 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -2,31 +2,31 @@
|
|||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": {{ .Title | jsonify }},
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}",
|
||||
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}",
|
||||
"url" : "{{ .Permalink }}",
|
||||
"description": {{ with (.Description | default (replaceRE "\n" " " .Summary)) }}{{ . | jsonify }}{{ end }},
|
||||
"headline": "{{ .Title }}",
|
||||
"datePublished": {{ .Date.Format "2006-01-02T15:04:05Z07:00" }},
|
||||
"dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }},
|
||||
"url" : {{ .Permalink }},
|
||||
"description": {{ with (.Description | default (replaceRE "\n" " " .Summary)) }}"{{ . }}"{{ end }},
|
||||
{{ with $.Param "image" -}}
|
||||
"image" : "{{ . | absURL }}",
|
||||
"image" : {{ . | absURL }},
|
||||
{{ end -}}
|
||||
{{ with .Params.tags -}}
|
||||
"keywords": {{ . | jsonify }},
|
||||
"keywords": {{ . }},
|
||||
{{ 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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue