hackertours-theme/layouts/partials/single_json_ld.html
2019-03-08 13:32:05 +01:00

32 lines
987 B
HTML

<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 (.Description | default (replaceRE "\n" " " .Summary)) }}{{ . | jsonify }}{{ end }},
{{ with $.Param "image" -}}
"image" : "{{ . | absURL }}",
{{ end -}}
{{ with .Params.tags -}}
"keywords": {{ . | jsonify }},
{{ end -}}
{{ with $.Param "author" -}}
"author": {
"@type": "Person",
"name": {{ . | jsonify }}
},
{{ end -}}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ .Site.BaseURL }}"
},
"publisher": {
"@type": "Organization",
"name": {{ .Site.Title | jsonify }},
"url": "{{ .Site.BaseURL }}",
}
}
</script>