feat: update meta tags

This commit is contained in:
Henk Verlinde
2021-06-25 16:04:42 +02:00
parent 75bde49e1c
commit 819cbc3ae8
13 changed files with 294 additions and 217 deletions

View File

@ -2,11 +2,11 @@
<meta name="robots" content="noindex, follow">
{{ else -}}
{{ with .Params.robots -}}
<meta name="robots" content="{{ . }}">
<meta name="robots" content="{{ . }}">
{{ else -}}
<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">
<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">
{{ end -}}
{{ end -}}
@ -23,28 +23,22 @@
{{ end -}}
{{ if $.Scratch.Get "paginator" }}
<link rel="canonical" href="{{ .Paginator.URL | relURL }}">
<link rel="canonical" href="{{ .Paginator.URL | absURL }}">
{{ if .Paginator.HasPrev -}}
<link rel="prev" href="{{ .Paginator.Prev.URL | relURL }}">
<link rel="prev" href="{{ .Paginator.Prev.URL | absURL }}">
{{ end -}}
{{ if .Paginator.HasNext -}}
<link rel="next" href="{{ .Paginator.Next.URL | relURL }}">
<link rel="next" href="{{ .Paginator.Next.URL | absURL }}">
{{ end -}}
{{ else -}}
<link rel="canonical" href="{{ .RelPermalink }}">
{{ else -}}
<link rel="canonical" href="{{ .Permalink }}">
{{ end -}}
{{ partial "head/twitter_cards.html" . }}
<meta name="twitter:site" content="@{{ .Site.Params.twitterSite }}">
<meta name="twitter:creator" content="@{{ .Site.Params.twitterCreator }}">
{{ 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 }}">
<meta property="og:locale" content="{{ .Site.Params.ogLocale }}">
{{ partial "head/twitter_cards.html" . }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .RelPermalink | safeURL }}">
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
{{ partial "head/structured-data.html" . }}