<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" . -}}
  {{ template "_internal/twitter_cards.html" . -}}
  {{ partialCached "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>
