portails/layouts/partials/head/seo.html

51 lines
1.9 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 -}}
2020-11-04 08:26:58 +01:00
<meta name="robots" content="{{ . }}">
2020-04-15 15:48:16 +02:00
{{ else -}}
2020-11-04 08:26:58 +01: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" }}
<link rel="canonical" href="{{ .Paginator.URL | absURL }}">
{{ if .Paginator.HasPrev -}}
<link rel="prev" href="{{ .Paginator.Prev.URL | absURL }}">
{{ end -}}
{{ if .Paginator.HasNext -}}
<link rel="next" href="{{ .Paginator.Next.URL | absURL }}">
{{ end -}}
{{ else -}}
2020-04-15 15:48:16 +02:00
<link rel="canonical" href="{{ .Permalink }}">
{{ end -}}
2020-11-04 08:26:58 +01:00
{{ partial "head/twitter_cards.html" . }}
<meta name="twitter:site" content="@{{ .Site.Params.twitterSite }}">
<meta name="twitter:creator" content="@{{ .Site.Params.twitterCreator }}">
2020-04-15 15:48:16 +02:00
2020-11-04 08:26:58 +01:00
{{ partial "head/opengraph.html" . }}
<meta property="article:publisher" content="https://www.facebook.com/{{ .Site.Params.facebookPublisher }}">
<meta property="article:author" content="https://www.facebook.com/{{ .Site.Params.facebookAuthor }}">
2020-04-15 15:48:16 +02:00
<meta property="og:locale" content="{{ .Site.Params.ogLocale }}">
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
2020-11-04 08:26:58 +01:00
{{ partial "head/structured-data.html" . }}