aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontpage/layouts/partials/head/seo.html
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
committerivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
commit900bb5e845c3ad44defbd427cae3d44a4a43321f (patch)
treedf3d96a93771884add571e82336c29fc3d9c7a1c /code/frontpage/layouts/partials/head/seo.html
downloadgreatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.tar.xz
greatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.zip
feat: Initial commit
Diffstat (limited to 'code/frontpage/layouts/partials/head/seo.html')
-rw-r--r--code/frontpage/layouts/partials/head/seo.html48
1 files changed, 48 insertions, 0 deletions
diff --git a/code/frontpage/layouts/partials/head/seo.html b/code/frontpage/layouts/partials/head/seo.html
new file mode 100644
index 0000000..ac31d72
--- /dev/null
+++ b/code/frontpage/layouts/partials/head/seo.html
@@ -0,0 +1,48 @@
+{{ if eq .Kind "404" -}}
+ <meta name="robots" content="noindex, follow">
+{{ else -}}
+ {{ with .Params.robots -}}
+ <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">
+ {{ 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 -}}
+ {{ with .Summary | plainify -}}
+ <meta name="description" content="{{ . }}">
+ {{ else -}}
+ <meta name="description" content="{{ .Site.Params.description }}">
+ {{ end -}}
+{{ end -}}
+
+{{ 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 -}}
+ <link rel="canonical" href="{{ .Permalink }}">
+{{ end -}}
+
+{{ partial "head/opengraph.html" . }}
+{{ partial "head/twitter_cards.html" . }}
+
+{{ range .AlternativeOutputFormats -}}
+ <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
+{{ end -}}
+
+{{ partial "head/structured-data.html" . }}