2020-04-21 16:55:06 +02:00
|
|
|
{{- $params := .Scratch.Get "params" -}}
|
|
|
|
|
2020-02-16 19:19:55 +01:00
|
|
|
{{- with .Site.Params.verification.google -}}
|
|
|
|
<meta name="google-site-verification" content="{{ . }}" />
|
|
|
|
{{- end -}}
|
|
|
|
{{- with .Site.Params.verification.bing -}}
|
|
|
|
<meta name="msvalidate.01" content="{{ . }}" />
|
|
|
|
{{- end -}}
|
|
|
|
{{- with .Site.Params.verification.yandex -}}
|
|
|
|
<meta name="yandex-verification" content="{{ . }}" />
|
|
|
|
{{- end -}}
|
|
|
|
{{- with .Site.Params.verification.pinterest -}}
|
|
|
|
<meta name="p:domain_verify" content="{{ . }}" />
|
|
|
|
{{- end -}}
|
|
|
|
{{- with .Site.Params.verification.baidu -}}
|
|
|
|
<meta name="baidu-site-verification" content="{{ . }}" />
|
|
|
|
{{- end -}}
|
|
|
|
|
2020-02-03 11:38:10 +01:00
|
|
|
{{- /* Home SEO */ -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- if .IsHome -}}
|
2019-08-09 15:25:13 +02:00
|
|
|
<script type="application/ld+json">
|
|
|
|
{
|
2020-01-31 15:53:04 +01:00
|
|
|
"@context": "http://schema.org",
|
|
|
|
"@type": "WebSite",
|
2020-03-14 08:43:58 +01:00
|
|
|
"url": "{{ .Permalink }}",
|
|
|
|
{{- with .Site.LanguageCode -}}
|
|
|
|
"inLanguage": "{{ . }}",
|
|
|
|
{{- end -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- with .Site.Author.name -}}
|
|
|
|
"author": {
|
|
|
|
"@type": "Person",
|
2020-04-22 19:31:22 +02:00
|
|
|
"name": {{ . | safeHTML }}
|
2020-01-31 15:53:04 +01:00
|
|
|
},
|
|
|
|
{{- end -}}
|
|
|
|
{{- with .Site.Params.description -}}
|
2020-04-22 19:31:22 +02:00
|
|
|
"description": {{ . | safeHTML }},
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- end -}}
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- with $params.seo.image -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
"image": "{{ .url | absURL }}",
|
|
|
|
{{- end -}}
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- with $params.seo.logo -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
"thumbnailUrl": "{{ .url | absURL }}",
|
|
|
|
{{- end -}}
|
|
|
|
{{- with .Site.Copyright -}}
|
2020-04-22 19:31:22 +02:00
|
|
|
"license": "{{ . | safeHTML }}",
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- end -}}
|
2020-04-22 19:31:22 +02:00
|
|
|
"name": {{ .Site.Title | safeHTML }}
|
2019-02-03 12:30:44 +01:00
|
|
|
}
|
2019-08-09 15:25:13 +02:00
|
|
|
</script>
|
2020-02-03 11:38:10 +01:00
|
|
|
|
|
|
|
{{- /* Page SEO */ -}}
|
|
|
|
{{- else if .IsPage -}}
|
2019-08-09 15:25:13 +02:00
|
|
|
<script type="application/ld+json">
|
|
|
|
{
|
2020-01-31 15:53:04 +01:00
|
|
|
"@context": "http://schema.org",
|
|
|
|
"@type": "BlogPosting",
|
2020-04-22 19:31:22 +02:00
|
|
|
"headline": {{ .Title | safeHTML }},
|
2020-03-14 08:43:58 +01:00
|
|
|
"inLanguage": "{{ .Site.LanguageCode }}",
|
2020-01-31 15:53:04 +01:00
|
|
|
"mainEntityOfPage": {
|
|
|
|
"@type": "WebPage",
|
|
|
|
"@id": "{{ .Permalink }}"
|
2019-08-09 15:25:13 +02:00
|
|
|
},
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- if ge $params.seo.image.width 696 -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
"image": {
|
|
|
|
"@type": "ImageObject",
|
2020-04-21 16:55:06 +02:00
|
|
|
"url": "{{ $params.seo.image.url | absURL }}",
|
|
|
|
"width": {{ $params.seo.image.width }},
|
|
|
|
"height": {{ $params.seo.image.height }}
|
2020-01-31 15:53:04 +01:00
|
|
|
},
|
|
|
|
{{- end -}}
|
|
|
|
"genre": "{{ .Type }}",
|
|
|
|
{{- with .Params.tags -}}
|
|
|
|
"keywords": "{{ delimit . ", " }}",
|
|
|
|
{{- end -}}
|
|
|
|
"wordcount": {{ .WordCount }},
|
|
|
|
"url": "{{ .Permalink }}",
|
|
|
|
{{- if not .PublishDate.IsZero -}}
|
2020-04-22 19:31:22 +02:00
|
|
|
"datePublished": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }},
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- else if not .Date.IsZero -}}
|
2020-04-22 19:31:22 +02:00
|
|
|
"datePublished": {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }},
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- end -}}
|
|
|
|
{{- with .Lastmod -}}
|
2020-04-22 19:31:22 +02:00
|
|
|
"dateModified": {{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }},
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- end -}}
|
|
|
|
{{- with .Site.Copyright -}}
|
2020-04-22 19:31:22 +02:00
|
|
|
"license": {{ . | safeHTML }},
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- end -}}
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- with $params.seo.publisher -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
"publisher": {
|
|
|
|
"@type": "Organization",
|
2020-04-23 10:49:30 +02:00
|
|
|
"name": {{ .name | safeHTML }},
|
2020-01-31 15:53:04 +01:00
|
|
|
"logo": {
|
|
|
|
"@type": "ImageObject",
|
|
|
|
"url": "{{ .logo.url | absURL }}",
|
|
|
|
"width": {{ .logo.width }},
|
|
|
|
"height": {{ .logo.height }}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{{- end -}}
|
2020-03-14 08:43:58 +01:00
|
|
|
{{- with .Params.author | default .Site.Author.name | default (T "author") -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
"author": {
|
|
|
|
"@type": "Person",
|
2020-04-22 19:31:22 +02:00
|
|
|
"name": {{ . | safeHTML }}
|
2020-01-31 15:53:04 +01:00
|
|
|
},
|
|
|
|
{{- end -}}
|
2020-04-22 19:31:22 +02:00
|
|
|
"description": {{ .Description | safeHTML }}
|
2019-08-09 15:25:13 +02:00
|
|
|
}
|
|
|
|
</script>
|
2020-02-06 17:10:00 +01:00
|
|
|
{{- end -}}
|