* fix: preload Google Fonts to reduce layout shift Move font loading from footer JS to head with preconnect and preload hints. This reduces CLS by ensuring fonts load earlier in the page lifecycle instead of being dynamically inserted after footer loads. * style: reorder custom font inclusion in head template --------- Co-authored-by: delize <4028612+delize@users.noreply.github.com> Co-authored-by: Jimmy Cai <jimmy@cai.im>
29 lines
1.0 KiB
HTML
29 lines
1.0 KiB
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/custom-font.html" . -}}
|
|
{{- 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 -}}
|
|
|
|
{{- $favicon := partial "helper/image" (dict "Image" .Site.Params.favicon "Resources" resources) -}}
|
|
{{ with $favicon }}
|
|
<link rel="shortcut icon" href="{{ .Permalink }}" />
|
|
{{ end }}
|
|
|
|
{{- partial "google_analytics.html" . -}}
|
|
{{- partial "head/custom.html" . -}}
|