portails/layouts/partials/head/seo.html

45 lines
1.5 KiB
HTML
Raw Normal View History

2020-11-04 08:26:58 +01:00
{{ if eq .Kind "404" -}}
<meta name="robots" content="noindex, follow">
2020-04-15 15:48:16 +02:00
{{ else -}}
{{ with .Params.robots -}}
2021-06-25 16:04:42 +02:00
<meta name="robots" content="{{ . }}">
2020-04-15 15:48:16 +02:00
{{ else -}}
2021-06-25 16:04:42 +02:00
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
<meta name="bingbot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
2020-04-15 15:48:16 +02:00
{{ end -}}
{{ end -}}
{{ if .IsHome -}}
<title>{{ .Site.Params.title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.titleAddition }}</title>
{{ else -}}
<title>{{ .Title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.title }}</title>
{{ end -}}
{{ with .Description -}}
<meta name="description" content="{{ . }}">
{{ else -}}
<meta name="description" content="{{ .Site.Params.description }}">
{{ end -}}
2020-11-04 08:26:58 +01:00
{{ if $.Scratch.Get "paginator" }}
2021-06-25 16:04:42 +02:00
<link rel="canonical" href="{{ .Paginator.URL | absURL }}">
2020-11-04 08:26:58 +01:00
{{ if .Paginator.HasPrev -}}
2021-06-25 16:04:42 +02:00
<link rel="prev" href="{{ .Paginator.Prev.URL | absURL }}">
2020-11-04 08:26:58 +01:00
{{ end -}}
{{ if .Paginator.HasNext -}}
2021-06-25 16:04:42 +02:00
<link rel="next" href="{{ .Paginator.Next.URL | absURL }}">
2020-11-04 08:26:58 +01:00
{{ end -}}
2021-06-25 16:04:42 +02:00
{{ else -}}
<link rel="canonical" href="{{ .Permalink }}">
2020-04-15 15:48:16 +02:00
{{ end -}}
2020-11-04 08:26:58 +01:00
{{ partial "head/opengraph.html" . }}
2021-06-25 16:04:42 +02:00
{{ partial "head/twitter_cards.html" . }}
2020-04-15 15:48:16 +02:00
{{ range .AlternativeOutputFormats -}}
2021-06-25 16:04:42 +02:00
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
2020-04-15 15:48:16 +02:00
{{ end -}}
2020-11-04 08:26:58 +01:00
{{ partial "head/structured-data.html" . }}