forked from drowl87/hextra_mirror

chore: update theme info chore: use dataset chore: support editURL config option * add toc and search config option chore: update head template
33 lines
1.1 KiB
HTML
33 lines
1.1 KiB
HTML
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
{{ if hugo.IsProduction -}}
|
||
<meta name="robots" content="index, follow" />
|
||
{{ else -}}
|
||
<meta name="robots" content="noindex, nofollow" />
|
||
{{ end -}}
|
||
{{ partialCached "favicons.html" . }}
|
||
<title>
|
||
{{- if .IsHome -}}
|
||
{{ .Site.Title -}}
|
||
{{ else -}}
|
||
{{ with .Title }}{{ . }} – {{ end -}}
|
||
{{ .Site.Title -}}
|
||
{{ end -}}
|
||
</title>
|
||
<meta name="description" content="{{ partial "utils/page-description.html" . }}" />
|
||
{{ partial "opengraph.html" . }}
|
||
{{ template "_internal/schema.html" . -}}
|
||
{{ partial "head-css.html" . }}
|
||
<script>
|
||
/* Initialize light/dark mode */
|
||
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>
|
||
|
||
{{ partial "custom/head-end.html" . }}
|
||
</head>
|