2020-05-11 15:59:06 +00:00
|
|
|
<title>{{ if .IsHome }}{{ $.Site.Title | safeHTML }}{{ else }}{{ .Title | safeHTML }}{{ end }}</title>
|
2020-10-21 03:28:02 +00:00
|
|
|
|
2020-10-23 19:13:14 +00:00
|
|
|
{{- /* Only enable asset bundling in production */ -}}
|
|
|
|
{{- $style := resources.Get "css/main.css" -}}
|
|
|
|
{{- if hugo.IsProduction }}
|
|
|
|
{{- $style = $style | resources.Minify | resources.Fingerprint -}}
|
|
|
|
{{- end }}
|
2020-10-21 03:28:02 +00:00
|
|
|
<link rel="stylesheet" href="{{ $style.Permalink }}" />
|
2020-05-11 15:59:06 +00:00
|
|
|
|
|
|
|
{{- /* Some sane <meta> tags default */ -}}
|
|
|
|
{{ hugo.Generator }}
|
2019-09-20 16:11:12 +00:00
|
|
|
<meta charset="utf-8">
|
2020-10-24 12:48:43 +00:00
|
|
|
|
|
|
|
{{- with .Site.Author }}
|
|
|
|
{{- $names := slice }}
|
|
|
|
{{- range . }}{{ $names = $names | append .name }}{{ end }}
|
|
|
|
<meta name="author" content="{{ delimit $names ", " (printf " %s " (i18n "and")) }}" />
|
|
|
|
{{- end }}
|
|
|
|
|
2020-05-11 15:59:06 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<meta name="referrer" content="no-referrer" />
|
|
|
|
<meta name="description" content="{{ if (and (eq .Kind "home") .IsHome) }}{{ .Site.Title }}{{ else }}{{ .Summary | safeHTML }}{{ end }}" />
|
2020-10-24 12:48:43 +00:00
|
|
|
{{- template "_internal/twitter_cards.html" . }}
|
|
|
|
{{- template "_internal/opengraph.html" . }}
|
2020-05-11 15:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{- /* Linking all of the output formats for discovery. */ -}}
|
2020-05-12 08:31:55 +00:00
|
|
|
{{- range .OutputFormats }}
|
|
|
|
{{- printf "<link rel=%q type=%q href=%q />" .Rel .MediaType.Type .Permalink | safeHTML }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
|
2020-10-23 19:13:14 +00:00
|
|
|
{{- if hugo.IsProduction }}
|
2020-05-12 08:31:55 +00:00
|
|
|
{{ template "_internal/google_analytics_async.html" . }}
|
|
|
|
{{ template "_internal/disqus.html" . }}
|
|
|
|
{{- end }}
|
2020-05-11 15:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{- /* Persistent theme.
|
|
|
|
It's a very small script so there's little effect on perceived performance. */ -}}
|
2020-05-09 07:19:04 +00:00
|
|
|
<script>
|
|
|
|
const theme = window.localStorage.getItem('theme');
|
|
|
|
if (theme) {
|
|
|
|
document.documentElement.dataset.theme = theme;
|
|
|
|
}
|
|
|
|
</script>
|