hugo-theme-stack/layouts/partials/head/head.html

32 lines
1.1 KiB
HTML
Raw Normal View History

2020-09-27 05:00:48 +08:00
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
2020-09-12 04:50:30 +08:00
2020-09-27 05:00:48 +08:00
{{- $description := partialCached "data/description" . .RelPermalink -}}
<meta name='description' {{ printf "content=%q" $description | safeHTMLAttr }}>
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
2020-08-22 19:20:08 +08:00
{{- $title := partial "data/title" . -}}
2020-09-27 05:00:48 +08:00
<title>{{ $title }}</title>
<link rel='canonical' href='{{ .Permalink }}'>
{{- partial "head/style.html" . -}}
{{- partial "head/script.html" . -}}
{{- partial "head/opengraph/include.html" . -}}
{{- range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{- end -}}
{{ with .Site.Params.favicon }}
2022-06-12 18:50:04 +08:00
{{ $favicon := resources.Get . }}
{{ if $favicon }}
<link rel="shortcut icon" href="{{ $favicon.RelPermalink }}" />
{{ else }}
2024-03-12 21:58:08 +08:00
<link rel="shortcut icon" href="{{ . | relURL }}" />
2022-06-12 18:50:04 +08:00
{{ end }}
{{ end }}
{{- template "_internal/google_analytics.html" . -}}
{{- partial "head/custom.html" . -}}