2020-11-03 17:07:30 +00:00
|
|
|
<title>{{ if not .IsHome }}{{ .Title | safeHTML }} |{{ end }} {{ $.Site.Title | safeHTML }}</title>
|
2020-11-02 08:53:37 +00:00
|
|
|
|
|
|
|
{{- $stylesheets := slice }}
|
|
|
|
|
|
|
|
<!-- The main stylesheet being compiled. -->
|
2024-11-19 02:56:29 +00:00
|
|
|
{{- $main := resources.Get "scss/main.scss" | toCSS }}
|
2020-11-02 08:53:37 +00:00
|
|
|
|
|
|
|
{{- /* Combine all of the custom schems in under one stylesheet */ -}}
|
2024-11-19 02:56:29 +00:00
|
|
|
{{- $themes := resources.Get "templates/theme.scss" | resources.ExecuteAsTemplate "css/themes.css" . | toCSS
|
2024-05-18 10:51:19 +00:00
|
|
|
}}
|
2020-11-02 08:53:37 +00:00
|
|
|
|
2024-05-18 10:51:19 +00:00
|
|
|
{{- /* Append the main stylesheet to be the last so the resulting stylesheet will make the custom colorschemes at the
|
|
|
|
front. */ -}}
|
2023-02-27 08:47:37 +00:00
|
|
|
{{ $stylesheets = $stylesheets | append $themes $main }}
|
2020-11-02 08:53:37 +00:00
|
|
|
|
|
|
|
{{ $style := $stylesheets | resources.Concat "css/main.css" }}
|
|
|
|
|
|
|
|
{{- /* Only enable asset bundling in production */ -}}
|
|
|
|
{{- if hugo.IsProduction }}
|
2024-05-18 10:51:19 +00:00
|
|
|
{{- $style = $style | resources.Minify | resources.Fingerprint -}}
|
2020-11-02 08:53:37 +00:00
|
|
|
{{- end }}
|
2023-04-27 16:53:55 +00:00
|
|
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
2023-03-06 15:24:08 +00:00
|
|
|
{{- /* Persistent theme.
|
|
|
|
It's a very small script so there's little effect on perceived performance. */ -}}
|
|
|
|
<script>
|
2024-05-18 10:51:19 +00:00
|
|
|
let theme = window.localStorage.getItem('theme');
|
2023-03-06 15:24:08 +00:00
|
|
|
if (theme) {
|
|
|
|
document.documentElement.dataset.theme = theme;
|
|
|
|
}
|
|
|
|
</script>
|
2020-11-02 08:53:37 +00:00
|
|
|
|
2024-05-18 10:51:19 +00:00
|
|
|
<link rel="shortcut icon" href="{{ relURL " favicon.png" }}" />
|
2022-10-30 06:19:38 +00:00
|
|
|
|
2020-11-02 08:53:37 +00:00
|
|
|
{{ hugo.Generator }}
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
2024-11-19 03:33:08 +00:00
|
|
|
{{- with .Site.Params.author }}
|
2020-11-02 08:53:37 +00:00
|
|
|
{{- $names := slice }}
|
|
|
|
{{- range . }}{{ $names = $names | append .name }}{{ end }}
|
2024-05-18 10:51:19 +00:00
|
|
|
<meta name="author" content="{{ delimit $names " , " (printf " %s " (i18n " and")) }}" />
|
2020-11-02 08:53:37 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<meta name="referrer" content="no-referrer" />
|
2024-05-18 10:51:19 +00:00
|
|
|
<meta name="description" content="{{ if (and (eq .Kind " home") .IsHome) }}{{ .Site.Title }}{{ else }}{{ .Summary |
|
|
|
|
safeHTML }}{{ end }}" />
|
2020-11-02 08:53:37 +00:00
|
|
|
{{- template "_internal/twitter_cards.html" . }}
|
|
|
|
{{- template "_internal/opengraph.html" . }}
|
2022-05-01 12:38:52 +00:00
|
|
|
{{- template "_internal/schema.html" . }}
|
2020-11-02 08:53:37 +00:00
|
|
|
|
|
|
|
{{- range .OutputFormats }}
|
2024-05-18 10:51:19 +00:00
|
|
|
{{- printf "<link rel=%q type=%q href=%q />" .Rel .MediaType.Type .RelPermalink | safeHTML }}
|
2020-11-02 08:53:37 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
|
|
|
|
{{- if hugo.IsProduction }}
|
2024-05-18 10:51:19 +00:00
|
|
|
{{ template "_internal/disqus.html" . }}
|
2020-11-02 08:53:37 +00:00
|
|
|
{{- end }}
|