hugo-theme-stack/layouts/partials/head/head.html
Chen Lily 96be9b767b
**feat:** Add Umami analytics and view count to article details
- Added conditional rendering for view count in article details based on `Site.Params.Analytics`.
- Updated Umami analytics script to use structured parameters and fixed script inclusion.
- Included Umami analytics script in the head section.
2025-02-28 10:55:11 +08:00

28 lines
959 B
HTML

<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
{{- $description := partialCached "data/description" . .RelPermalink -}}
<meta name='description' {{ printf "content=%q" $description | safeHTMLAttr }}>
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
{{- $title := partial "data/title" . -}}
<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 }}
<link rel="shortcut icon" href="{{ . | relURL }}" />
{{ end }}
{{- template "_internal/google_analytics.html" . -}}
{{- partial "head/analytics/include.html" . -}}
{{- partial "head/custom.html" . -}}