2019-08-24 13:32:41 +02:00
|
|
|
{{ if .IsHome -}}
|
2019-08-09 15:25:13 +02:00
|
|
|
<script type="application/ld+json">
|
|
|
|
{
|
|
|
|
"@context": "http://schema.org",
|
|
|
|
"@type": "WebSite",
|
|
|
|
"url": "{{ .Site.BaseURL }}",
|
2019-08-24 13:32:41 +02:00
|
|
|
{{ with .Site.Author.name }}
|
2019-08-09 15:25:13 +02:00
|
|
|
"author": {
|
|
|
|
"@type": "Person",
|
2019-08-24 13:32:41 +02:00
|
|
|
"name": "{{ . }}"
|
2019-08-09 15:25:13 +02:00
|
|
|
},
|
|
|
|
{{ end }}
|
2019-08-24 13:32:41 +02:00
|
|
|
{{ with .Site.Params.description }}
|
|
|
|
"description": "{{ . }}",
|
2019-08-09 15:25:13 +02:00
|
|
|
{{ end }}
|
|
|
|
{{ with .Site.Params.image }}
|
|
|
|
"image": "{{ .url | absURL }}",
|
|
|
|
{{ end }}
|
|
|
|
{{ with .Site.Params.logo }}
|
|
|
|
"thumbnailUrl": "{{ .url | absURL }}",
|
|
|
|
{{ end }}
|
|
|
|
{{ with .Site.Copyright }}
|
|
|
|
"license": "{{ . }}",
|
|
|
|
{{ end }}
|
|
|
|
"name": "{{ .Site.Title }}"
|
2019-02-03 12:30:44 +01:00
|
|
|
}
|
2019-08-09 15:25:13 +02:00
|
|
|
</script>
|
2019-08-24 13:32:41 +02:00
|
|
|
{{ else if .IsPage -}}
|
2019-08-09 15:25:13 +02:00
|
|
|
<script type="application/ld+json">
|
|
|
|
{
|
|
|
|
"@context": "http://schema.org",
|
|
|
|
"@type": "BlogPosting",
|
|
|
|
"headline": "{{ .Title }}",
|
|
|
|
"mainEntityOfPage": {
|
|
|
|
"@type": "WebPage",
|
|
|
|
"@id": "{{ .Permalink }}"
|
|
|
|
},
|
|
|
|
{{ if ge (.Param "lua.image.width") 696 }}
|
|
|
|
"image": {
|
|
|
|
"@type": "ImageObject",
|
|
|
|
"url": "{{ .Param "lua.image.url" | absURL }}",
|
|
|
|
"width": {{ .Param "lua.image.width" }},
|
|
|
|
"height": {{ .Param "lua.image.height" }}
|
|
|
|
},
|
|
|
|
{{ else if ge .Site.Params.image.width 696 }}
|
|
|
|
"image": {
|
|
|
|
"@type": "ImageObject",
|
|
|
|
"url": "{{ .Site.Params.image.url | absURL }}",
|
|
|
|
"width": {{ .Site.Params.image.width }},
|
|
|
|
"height": {{ .Site.Params.image.height }}
|
|
|
|
},
|
|
|
|
{{ end }}
|
|
|
|
"genre": "{{ .Type }}",
|
|
|
|
{{ with .Params.tags }}
|
|
|
|
"keywords": "{{ delimit . ", " }}",
|
|
|
|
{{ end }}
|
|
|
|
"wordcount": {{ .WordCount }},
|
|
|
|
"url": "{{ .Permalink }}",
|
|
|
|
{{ if not .PublishDate.IsZero }}
|
|
|
|
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
|
|
|
{{ else if not .Date.IsZero }}
|
|
|
|
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
|
|
|
{{ end }}
|
|
|
|
{{ with .Lastmod }}
|
|
|
|
"dateModified": "{{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
|
|
|
{{ end }}
|
|
|
|
{{ with .Site.Copyright }}
|
|
|
|
"license": "{{ . }}",
|
|
|
|
{{ end }}
|
|
|
|
{{ with .Site.Params.publisher }}
|
|
|
|
"publisher": {
|
|
|
|
"@type": "Organization",
|
|
|
|
"name": "{{ .name }}",
|
|
|
|
"logo": {
|
|
|
|
"@type": "ImageObject",
|
|
|
|
"url": "{{ .logo.url | absURL }}",
|
|
|
|
"width": {{ .logo.width }},
|
|
|
|
"height": {{ .logo.height }}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{{ end }}
|
2019-08-24 13:32:41 +02:00
|
|
|
{{ with .Site.Author.Name }}
|
2019-08-09 15:25:13 +02:00
|
|
|
"author": {
|
|
|
|
"@type": "Person",
|
2019-08-24 13:32:41 +02:00
|
|
|
"name": "{{ . }}"
|
2019-08-09 15:25:13 +02:00
|
|
|
},
|
|
|
|
{{ end }}
|
|
|
|
"description": "{{ .Description }}"
|
|
|
|
}
|
|
|
|
</script>
|
2019-08-24 13:32:41 +02:00
|
|
|
{{ end }}
|