Update seo.html
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 20s

This commit is contained in:
obsidian 2024-04-22 16:48:19 +02:00
parent a4f8a20156
commit d625507f6c

View File

@ -1,65 +1,48 @@
<!-- Robots meta --> <!-- Robots meta -->
{{ if eq .Kind "404" -}} {{ if eq .Kind "404" -}}
<meta name="robots" content="noindex, follow"> <meta name="robots" content="noindex, follow" />
{{ else -}} {{ with .Params.robots -}}
<meta name="robots" content="{{ . }}" />
{{ else -}} {{ else -}}
{{ with .Params.robots -}} <meta name="robots" content="index, follow" />
<meta name="robots" content="{{ . }}"> <meta
{{ else -}} name="googlebot"
<meta name="robots" content="index, follow"> content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"
<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
{{ end -}} name="bingbot"
{{ end -}} content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"
/>
<!-- SEO title from config or front matter --> {{ end -}} {{ end -}}
<!-- Site title gets added EXCEPT on single post and project pages -->
<title>
{{- $paginator := .Paginate .RegularPagesRecursive }}
{{- with .Params.seo_title -}}
{{- . -}}
{{- else -}}
{{- .Title -}}
{{- end -}}
{{- with $paginator -}}
{{ if and (gt $paginator.TotalPages 1) (gt $paginator.PageNumber 1) }}
| Page {{ $paginator.PageNumber }}
{{- end -}}
{{- end -}}
{{ if (or (and (ne .Type "posts") (ne .Type "projets") (not .IsHome)) (and (not .IsPage) (not .IsHome))) }} | {{ .Site.Title -}}{{ end -}}
</title>
<!-- Author from config --> <!-- Author from config -->
{{ with .Params.author -}} {{ with .Params.author -}}
<meta name="author" content="{{ . }}"> <meta name="author" content="{{ . }}" />
{{ else -}} {{ else -}}
<meta name="author" content="{{ .Site.Params.author }}"> <meta name="author" content="{{ .Site.Params.author }}" />
{{ end -}} {{ end -}}
<!-- Description from config or front matter --> <!-- Description from config or front matter -->
{{ with .Description -}} {{ with .Description -}}
<meta name="description" content="{{ . }}"> <meta name="description" content="{{ . }}" />
{{ else -}} {{ else -}}
<meta name="description" content="{{ .Site.Params.description }}"> <meta name="description" content="{{ .Site.Params.description }}" />
{{ end -}} {{ end -}} {{ if $.Scratch.Get "paginator" }}
<link rel="canonical" href="{{ .Paginator.URL | absURL }}" />
{{ if $.Scratch.Get "paginator" }} {{ if .Paginator.HasPrev -}}
<link rel="canonical" href="{{ .Paginator.URL | absURL }}"> <link rel="prev" href="{{ .Paginator.Prev.URL | absURL }}" />
{{ if .Paginator.HasPrev -}} {{ end -}} {{ if .Paginator.HasNext -}}
<link rel="prev" href="{{ .Paginator.Prev.URL | absURL }}"> <link rel="next" href="{{ .Paginator.Next.URL | absURL }}" />
{{ end -}} {{ end -}} {{ else -}}
{{ if .Paginator.HasNext -}} <link rel="canonical" href="{{ .Permalink }}" />
<link rel="next" href="{{ .Paginator.Next.URL | absURL }}"> {{ end -}} {{ partial "head/seo/opengraph.html" . }} {{ partial
{{ end -}} "head/seo/twitter-cards.html" . }}
{{ else -}}
<link rel="canonical" href="{{ .Permalink }}">
{{ end -}}
{{ partial "head/seo/opengraph.html" . }}
{{ partial "head/seo/twitter-cards.html" . }}
<!-- Add rss+xml functionality --> <!-- Add rss+xml functionality -->
{{- with .OutputFormats.Get "rss" -}} {{- with .OutputFormats.Get "rss" -}} {{ printf `<link
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} rel="%s"
{{- end -}} type="%s"
href="%s"
{{ partial "head/seo/structured-data.html" . }} title="%s"
/>` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{- end -}} {{
partial "head/seo/structured-data.html" . }}