hackertours-theme/layouts/partials/single_json_ld.html
2017-10-24 11:45:29 +02:00

29 lines
890 B
HTML
Executable file

<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>