This repository has been archived on 2024-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
bird.tacowolf.net/themes/avian/layouts/partials/head.html

28 lines
No EOL
1,023 B
HTML

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{ block "title" . }}
{{- .Title }} - {{ .Site.Title -}}
{{ end }}</title>
{{- if .Description }}
<meta name="description" content="{{ .Description }}" />
{{ end -}}
{{- if .Keywords }}
<meta name="keywords" content="{{ delimit .Keywords " ," }}" />
{{ end -}}
{{- if .Params.Author }}
<meta name="author" content="{{ .Params.Author}}" />
{{ end -}}
{{ hugo.Generator }}
{{ partialCached "css.html" . }}
<script>
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
if (localStorage.getItem('color-theme') === 'dark' || (!('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove('dark')
}
</script>
</head>