2020-04-08 18:44:29 +00:00
< head >
< meta charset = "utf-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
{{- $title := ( .Title ) -}}
{{- $siteTitle := ( .Site.Title ) -}}
{{- if .IsHome -}}
2020-06-24 07:57:58 +00:00
< title > {{ $siteTitle }} | Home < / title >
2020-04-08 18:44:29 +00:00
{{- else -}}
< title > {{ $title }} - {{ $siteTitle }}< / title >
{{- end -}}
{{- if isset .Site.Params "favicon" -}}
< link rel = "icon" type = "image/png" href = {{ . Site . Params . favicon } } / >
{{- end -}}
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2021-05-22 15:54:55 +00:00
< meta name = "description" content = "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" / >
2020-06-24 07:57:58 +00:00
< meta property = "og:image" content = "{{ .Site.Params.og_image }}" / >
2020-04-08 18:44:29 +00:00
{{ with .OutputFormats.Get "rss" -}}
{{ printf `< link rel = "%s" type = "%s" href = "%s" title = "%s" / > ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
2021-06-08 19:57:36 +00:00
2020-04-08 18:44:29 +00:00
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
2020-04-10 19:41:05 +00:00
< script src = "{{ .Site.BaseURL }}js/feather.min.js" > < / script >
2021-06-04 21:34:27 +00:00
{{ $fontstyle := resources.Get "css/fonts.css" | fingerprint }}
< link href = "{{ $fontstyle.Permalink }}" rel = "stylesheet" >
2021-06-08 19:57:36 +00:00
2021-06-04 21:34:27 +00:00
{{ $style := resources.Get "css/main.css" | fingerprint }}
< link rel = "stylesheet" type = "text/css" media = "screen" href = "{{ $style.Permalink }}" / >
2021-06-08 19:57:36 +00:00
2021-09-24 17:38:28 +00:00
{{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") (eq .Site.Params.mode "toggle") -}}
2021-06-04 21:34:27 +00:00
{{ $darkstyle := resources.Get "css/dark.css" | fingerprint }}
2021-09-24 17:38:28 +00:00
< link id = "darkModeStyle" rel = "stylesheet" type = "text/css" href = "{{ $darkstyle.Permalink }}" { { if eq . Site . Params . mode " auto " } } media = "(prefers-color-scheme: dark)" { { end } } { { if eq . Site . Params . mode " toggle " } } disabled { { end } } / >
2020-10-04 16:11:49 +00:00
{{ end }}
2022-12-29 11:52:53 +00:00
<!-- Mathjax support -->
{{ with .Site.Params.mathjax }}
< script type = "text/javascript"
2023-01-05 22:48:48 +00:00
src="js/MathJax.js" integrity="sha384-Ra6zh6uYMmH5ydwCqqMoykyf1T/+ZcnOQfFPhDrp2kI4OIxadnhsvvA2vv9A7xYv">
2022-12-29 11:52:53 +00:00
< / script >
2023-01-05 22:31:01 +00:00
2022-12-29 11:52:53 +00:00
<!-- inline Mathjax -->
< script type = "text/x-mathjax-config" >
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$'], ['\[','\]']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: { equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"] }
}
});
< / script >
{{ end }}
<!-- KaTeX support -->
{{ with .Site.Params.katex }}
2023-01-05 22:43:50 +00:00
< link rel = "stylesheet" href = "css/katex.min.css" integrity = "sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" >
< script defer src = "js/katex.min.js" integrity = "sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" < / script >
< script defer src = "auto-render.min.js" integrity = "sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05"
2023-01-05 22:35:24 +00:00
onload="renderMathInElement(document.body);">< / script >
2023-01-05 22:31:01 +00:00
2022-12-29 11:52:53 +00:00
<!-- inline KaTeX -->
< script >
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
});
< / script >
{{ end }}
2023-01-05 22:31:01 +00:00
2020-10-04 16:11:49 +00:00
<!-- Custom CSS style get applied last -->
{{- if isset .Site.Params "customcss" }}
{{ range .Site.Params.customCSS }}
2021-06-08 19:57:36 +00:00
{{ $customstyle := resources.Get . | fingerprint }}
< link rel = "stylesheet" type = "text/css" href = "{{ $customstyle.Permalink }}" >
2020-10-04 16:11:49 +00:00
{{ end }}
2020-04-16 07:20:38 +00:00
{{- end -}}
2020-04-08 18:44:29 +00:00
{{- range .Site.Params.customJS }}
{{- if or (hasPrefix . "http://") (hasPrefix . "https://") }}
< script src = "{{ . }}" > < / script >
2022-02-27 09:10:25 +00:00
{{- else if (hasPrefix . "< script " ) } }
{{ .| safeHTML }}
2020-04-08 18:44:29 +00:00
{{- else }}
< script src = "{{ $.Site.BaseURL }}{{ . }}" > < / script >
{{- end }}
{{- end }}
2020-10-04 16:11:49 +00:00
< / head >