Improve the JSON-LD output and add it to sections and front page as well.
This commit is contained in:
parent
b72dca040b
commit
f25ad69da2
1 changed files with 40 additions and 3 deletions
|
|
@ -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 }}",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue