Added json-ld and fixes to meta tags.
This commit is contained in:
parent
ba7fac2547
commit
fb2dcc80cb
1 changed files with 35 additions and 1 deletions
29
layouts/partials/single_json_ld.html
Executable file
29
layouts/partials/single_json_ld.html
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
<script type="application/ld+json">
|
||||
{
|
||||
"@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 (replaceRE "\n" "" (.Description | default .Summary)) }}{{ . | jsonify }}{{ end }},
|
||||
{{ with .Params.tags -}}
|
||||
"keywords": {{ . | jsonify }},
|
||||
{{ end -}}
|
||||
{{ with $.Param "author" -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{ end -}}
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Site.BaseURL }}"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{{ .Site.Title }}",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in a new issue