hugo-theme-relearn/layouts/partials/meta.html

35 lines
1.9 KiB
HTML
Raw Normal View History

<meta charset="utf-8">
{{- /* to avoid that user swiping to the left leaves a gap on the right side, we set minimum-scale, even if not advised to */}}
2022-02-28 00:19:32 +00:00
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
{{- if (ne .Site.Params.disableGeneratorVersion true) }}
{{- $gen := hugo.Generator }}
{{- $gen = replaceRE "\\s*/>$" ">" $gen }}
2022-07-07 19:42:45 +00:00
{{ $gen | safeHTML }}
{{- $ver := partial "version.txt" }}
{{- $ver := printf "<meta name=\"generator\" content=\"%s %s\">" "Relearn" $ver }}
2022-07-07 19:42:45 +00:00
{{ $ver | safeHTML }}
{{- end }}
{{- $title := partial "title.gotmpl" (dict "page" . "linkTitle" true) }}
{{- if not (and $title .RelPermalink (or (ne .Site.Params.disableSeoHiddenPages true) (not (partialCached "_relearn/pageIsHiddenSelfOrAncestor.gotmpl" (dict "page" . "to" .Site.Home) .Path .Site.Home.Path) ) ) ) }}
<meta name="robots" content="noindex, nofollow, noarchive, noimageindex">
{{- end }}
2024-10-24 21:34:37 +00:00
{{- $url := "" }}
{{- if .Params.menuPageRef }}
{{- with site.Home.GetPage (.Params.menuPageRef) }}
{{- $url = partial "permalink.gotmpl" (dict "to" .) }}
{{- else }}
{{- warnf "%q: WARNING: page '%s' not found for 'menuPageRef' parameter" .File.Filename .Params.menuPageRef }}
{{- end }}
{{- else if .Params.menuUrl }}
{{- $url = .Params.menuUrl }}
{{- end }}
{{- if $url }}
<meta http-equiv="refresh" content="0; url={{ $url }}">
{{- end }}
<meta name="description" content="{{ with trim (or .Description .Summary | plainify | htmlUnescape) "\n\r\t " }}{{ . }}{{ end }}">
{{- $authorName := partialCached "_relearn/authorName.gotmpl" . }}
<meta name="author" content="{{ $authorName }}">
2023-10-11 16:01:58 +00:00
{{- partial "twitter_cards.html" . }}
{{- partial "opengraph.html" . }}
{{- partial "schema.html" . }}