2021-04-15 01:37:18 -07:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="theme-color" content="#1dc868">
|
|
|
|
{{ if .Description }}
|
|
|
|
<meta name="description" content="{{ .Description }}">
|
|
|
|
{{ end }}
|
2024-05-22 22:41:47 -07:00
|
|
|
{{ with index (.GetTerms "series") 0 }}
|
|
|
|
<meta name="blog-series" content="{{ .Data.Term }}">
|
|
|
|
{{ end }}
|
2021-04-15 01:37:18 -07:00
|
|
|
|
2023-04-15 15:08:08 -07:00
|
|
|
{{ range .Params.discussionRooms }}
|
|
|
|
<meta name="matrix-highlight-comments" content="{{ . }}">
|
|
|
|
{{ end }}
|
|
|
|
|
2023-12-30 15:46:36 -08:00
|
|
|
<!-- Fonts -->
|
2024-06-24 19:23:06 -07:00
|
|
|
{{ if not (.Site.Params.noCss) }}
|
2024-05-14 20:31:23 -07:00
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&family=Raleway:wght@400;700&family=Lora&display=block" media="screen">
|
2024-06-24 19:23:06 -07:00
|
|
|
{{ end }}
|
2023-12-30 15:46:36 -08:00
|
|
|
|
|
|
|
<!-- External CSS (normalize and KaTeX -->
|
2024-06-24 19:23:06 -07:00
|
|
|
{{ if not (.Site.Params.noCss) }}
|
2023-12-30 16:00:57 -08:00
|
|
|
{{ partial "defercss.html" (dict "url" .Site.Params.normalizeCssUrl "extra" "") }}
|
2023-12-30 19:25:15 -08:00
|
|
|
{{ partial "defercss.html" (dict "url" .Site.Params.katexCssUrl "extra" "") }}
|
2024-06-24 19:23:06 -07:00
|
|
|
{{ end }}
|
2023-12-30 15:46:36 -08:00
|
|
|
|
|
|
|
<!-- Links to other formats (RSS, TOML) -->
|
2024-06-26 19:21:46 -07:00
|
|
|
{{ range .Site.Home.AlternativeOutputFormats -}}
|
2021-12-15 13:30:25 -08:00
|
|
|
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .Permalink | safeURL }}">
|
|
|
|
{{ end -}}
|
2023-12-30 15:46:36 -08:00
|
|
|
|
|
|
|
<!-- In-house CSS -->
|
2021-04-15 01:37:18 -07:00
|
|
|
{{ $style := resources.Get "scss/style.scss" | resources.ToCSS | resources.Minify }}
|
|
|
|
{{ $sidenotes := resources.Get "scss/sidenotes.scss" | resources.ToCSS | resources.Minify }}
|
|
|
|
{{ $code := resources.Get "scss/code.scss" | resources.ToCSS | resources.Minify }}
|
|
|
|
{{ $icon := resources.Get "img/favicon.png" }}
|
2024-06-24 19:21:46 -07:00
|
|
|
<style>.feather { display: inline !important; width: 10px; height: 10px; }</style>
|
|
|
|
<style>img { max-width: 70%; }</style>
|
2024-06-24 19:23:06 -07:00
|
|
|
{{ if not (.Site.Params.noCss) }}
|
2023-12-30 16:00:57 -08:00
|
|
|
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
|
|
|
{{ partial "defercss.html" (dict "url" $sidenotes.Permalink "extra" "") }}
|
|
|
|
{{ partial "defercss.html" (dict "url" $code.Permalink "extra" "") }}
|
2024-06-24 19:23:06 -07:00
|
|
|
{{ end }}
|
2021-04-15 01:37:18 -07:00
|
|
|
<link rel="icon" type="image/png" href="{{ $icon.Permalink }}">
|
|
|
|
|
2024-09-15 20:03:05 -07:00
|
|
|
{{ if .Params.custom_js }}
|
|
|
|
{{ range $customJs := .Params.custom_js }}
|
|
|
|
<script src="{{ page.Resources.Get $customJs }}"></script>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
2024-09-15 15:28:31 -07:00
|
|
|
{{ if hugo.IsServer }}
|
2023-12-30 15:46:36 -08:00
|
|
|
<!-- KaTeX auto-rendering for when we don't have a post-processing step. -->
|
2022-12-09 15:38:44 -08:00
|
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
|
|
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"
|
|
|
|
onload="renderMathInElement(document.body);"></script>
|
|
|
|
{{ end }}
|
|
|
|
|
2024-09-15 15:28:31 -07:00
|
|
|
{{ if .Params.bergamot }}
|
|
|
|
<!-- Code to support the Bergamot JS widget -->
|
|
|
|
<script defer src="{{ .Site.Params.katexJsUrl }}" crossorigin="anonymous"></script>
|
|
|
|
{{ $katexComponentJs := resources.Get "js/katex-component.js" | resources.Minify }}
|
|
|
|
<script defer src="{{ $katexComponentJs.Permalink }}"></script>
|
|
|
|
<script defer src="{{ .Site.Params.bergamotJsUrl }}"></script>
|
|
|
|
<script defer src="{{ .Site.Params.bergamotObjectLanguageJsUrl }}"></script>
|
|
|
|
{{ $bergamotHelpers := resources.Get "js/bergamot-helpers.js" | resources.Minify }}
|
|
|
|
<script defer src="{{ $bergamotHelpers.Permalink }}"></script>
|
|
|
|
{{ $bergamotStyle := resources.Get "scss/bergamot.scss" | resources.ToCSS | resources.Minify }}
|
|
|
|
{{ partial "defercss.html" (dict "url" $bergamotStyle.Permalink "extra" "") }}
|
|
|
|
{{ if .Params.bergamot.render_presets }}
|
|
|
|
{{ range $name, $rulefile := .Params.bergamot.render_presets }}
|
2024-09-15 16:18:48 -07:00
|
|
|
{{ $file := default (resources.Get $rulefile) (page.Resources.Get $rulefile) }}
|
|
|
|
{{ partial "bergamotrenderpreset.html" (dict "name" $name "file" $file.Content) }}
|
2024-09-15 15:28:31 -07:00
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
2024-09-15 16:18:48 -07:00
|
|
|
{{ partial "bergamotrenderpreset.html" (dict "name" "default" "file" (resources.Get "bergamot/rendering/minimal.bergamot").Content) }}
|
|
|
|
{{ end }}
|
|
|
|
{{ if .Params.bergamot.presets }}
|
|
|
|
{{ range $name, $preset := .Params.bergamot.presets }}
|
|
|
|
{{ $file := default (resources.Get $preset.file) (page.Resources.Get $preset.file) }}
|
2024-09-15 19:48:32 -07:00
|
|
|
{{ $info := dict "name" $name "prompt" $preset.prompt "query" $preset.query "file" $file.Content "renderPreset" $preset.render_preset "inputModes" $preset.input_modes }}
|
2024-09-15 16:18:48 -07:00
|
|
|
{{ partial "bergamotpreset.html" $info }}
|
|
|
|
{{ end }}
|
2024-09-15 15:28:31 -07:00
|
|
|
{{ end }}
|
2024-09-15 19:48:32 -07:00
|
|
|
{{ if .Params.bergamot.input_modes }}
|
|
|
|
{{ range $mode := .Params.bergamot.input_modes }}
|
|
|
|
{{ partial "bergamotinputmode.html" (dict "name" $mode.name "fn" $mode.fn) }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2024-09-15 15:28:31 -07:00
|
|
|
{{ end }}
|
|
|
|
|
2023-12-30 13:12:01 -08:00
|
|
|
{{ with .Site.Params.plausibleAnalyticsDomain }}
|
|
|
|
<!-- Plausible analytics, because log parsing is not working all that well. -->
|
|
|
|
<script defer data-domain="{{ . }}" src="https://plausible.io/js/script.js"></script>
|
|
|
|
{{ end }}
|
2022-12-09 15:38:44 -08:00
|
|
|
|
2021-04-15 01:37:18 -07:00
|
|
|
<title>{{ .Title }}</title>
|
|
|
|
</head>
|