2020-06-09 13:50:43 +02:00
|
|
|
{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
2020-06-08 15:24:51 +02:00
|
|
|
{{ if .IsHome -}}
|
|
|
|
<script type="application/ld+json">
|
|
|
|
{
|
|
|
|
"@context": "http://schema.org",
|
|
|
|
"@type": "WebSite",
|
|
|
|
"name": "{{ .Site.Title }}",
|
2020-06-09 13:50:43 +02:00
|
|
|
"url": {{ .Site.BaseURL }},
|
2020-06-08 15:24:51 +02:00
|
|
|
"description": "{{ .Site.Params.description }}",
|
2020-06-09 13:50:43 +02:00
|
|
|
"thumbnailUrl": {{ .Site.Params.Logo | absURL }},
|
2020-06-08 15:24:51 +02:00
|
|
|
"license": "{{ .Site.Params.Copyright }}"
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{{ else if .IsPage }}
|
|
|
|
<script type="application/ld+json">
|
|
|
|
{
|
|
|
|
"@context": "http://schema.org",
|
|
|
|
"@type": "BlogPosting",
|
|
|
|
"articleSection": "{{ .Section }}",
|
|
|
|
"name": "{{ .Title | safeJS }}",
|
|
|
|
"headline": "{{ .Title | safeJS }}",
|
2020-06-09 13:50:43 +02:00
|
|
|
"description": {{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }},
|
2020-06-08 15:24:51 +02:00
|
|
|
"inLanguage": {{ .Site.LanguageCode | default "en-us" }},
|
|
|
|
"isFamilyFriendly": "true",
|
|
|
|
"mainEntityOfPage": {
|
|
|
|
"@type": "WebPage",
|
2020-06-09 13:50:43 +02:00
|
|
|
"@id": {{ .Permalink }}
|
2020-06-08 15:24:51 +02:00
|
|
|
},
|
|
|
|
"author" : {
|
|
|
|
"@type": "Person",
|
|
|
|
"name": "{{ .Site.Author.name }}"
|
|
|
|
},
|
|
|
|
"creator" : {
|
|
|
|
"@type": "Person",
|
|
|
|
"name": "{{ .Site.Author.name }}"
|
|
|
|
},
|
|
|
|
"accountablePerson" : {
|
|
|
|
"@type": "Person",
|
|
|
|
"name": "{{ .Site.Author.name }}"
|
|
|
|
},
|
|
|
|
"copyrightHolder" : "{{ .Site.Title }}",
|
|
|
|
"copyrightYear" : "{{ .Date.Format "2006" }}",
|
2020-06-09 13:50:43 +02:00
|
|
|
"dateCreated": {{ .Date.Format $ISO8601 }},
|
|
|
|
"datePublished": {{ .PublishDate.Format $ISO8601 }},
|
|
|
|
"dateModified": {{ .Lastmod.Format $ISO8601 }},
|
2020-06-08 15:24:51 +02:00
|
|
|
"publisher":{
|
|
|
|
"@type":"Organization",
|
|
|
|
"name": {{ .Site.Title }},
|
|
|
|
"url": {{ .Site.BaseURL }},
|
|
|
|
"logo": {
|
|
|
|
"@type": "ImageObject",
|
2020-06-09 13:50:43 +02:00
|
|
|
"url": {{ .Site.Params.logo | absURL }},
|
2020-06-08 15:24:51 +02:00
|
|
|
"width":"32",
|
|
|
|
"height":"32"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"image": {{ if .Params.image }}{{ .Params.image | absURL }}{{ else}}{{ if .Params.featured_image }}{{ .Params.featured_image | absURL }}{{ else }}{{.Site.Params.logo | absURL }}{{ end }}{{ end }},
|
2020-06-09 13:50:43 +02:00
|
|
|
"url" : {{ .Permalink }},
|
2020-06-08 15:24:51 +02:00
|
|
|
"wordCount" : "{{ .WordCount }}",
|
2020-06-09 13:50:43 +02:00
|
|
|
"keywords" : [ {{ range $index, $tag := .Params.tags }}{{ if $index }}, {{ end }}"{{ $tag }}" {{ end }}]
|
2020-06-08 15:24:51 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{{ end }}
|