2023-01-06 20:52:55 +00:00
< head >
< meta charset = "utf-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
{{- $title := ( .Title ) -}}
{{- $siteTitle := ( .Site.Title ) -}}
{{- if .IsHome -}}
< title > {{ $siteTitle }} | Home < / title >
{{- else -}}
< title > {{ $title }} - {{ $siteTitle }}< / title >
{{- end -}}
{{- if isset .Site.Params "favicon" -}}
2023-01-06 20:59:17 +00:00
< link rel = "apple-touch-icon" sizes = "57x57" href = "/apple-icon-57x57.png" >
< link rel = "apple-touch-icon" sizes = "60x60" href = "/apple-icon-60x60.png" >
< link rel = "apple-touch-icon" sizes = "72x72" href = "/apple-icon-72x72.png" >
< link rel = "apple-touch-icon" sizes = "76x76" href = "/apple-icon-76x76.png" >
< link rel = "apple-touch-icon" sizes = "114x114" href = "/apple-icon-114x114.png" >
< link rel = "apple-touch-icon" sizes = "120x120" href = "/apple-icon-120x120.png" >
< link rel = "apple-touch-icon" sizes = "144x144" href = "/apple-icon-144x144.png" >
< link rel = "apple-touch-icon" sizes = "152x152" href = "/apple-icon-152x152.png" >
< link rel = "apple-touch-icon" sizes = "180x180" href = "/apple-icon-180x180.png" >
< link rel = "icon" type = "image/png" sizes = "192x192" href = "/android-icon-192x192.png" >
< link rel = "icon" type = "image/png" sizes = "32x32" href = "/favicon-32x32.png" >
< link rel = "icon" type = "image/png" sizes = "96x96" href = "/favicon-96x96.png" >
< link rel = "icon" type = "image/png" sizes = "16x16" href = "/favicon-16x16.png" >
< link rel = "manifest" href = "/manifest.json" >
< meta name = "msapplication-TileColor" content = "#ffffff" >
< meta name = "msapplication-TileImage" content = "/ms-icon-144x144.png" >
< meta name = "theme-color" content = "#ffffff" >
2023-01-06 20:52:55 +00:00
{{- end -}}
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< meta name = "description" content = "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" / >
< meta property = "og:image" content = "{{ .Site.Params.og_image }}" / >
{{ with .OutputFormats.Get "rss" -}}
{{ printf `< link rel = "%s" type = "%s" href = "%s" title = "%s" / > ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
< script src = "{{ .Site.BaseURL }}/js/feather.min.js" > < / script >
{{ $fontstyle := resources.Get "css/fonts.css" | fingerprint }}
< link href = "{{ $fontstyle.Permalink }}" rel = "stylesheet" >
{{ $style := resources.Get "css/main.css" | fingerprint }}
< link rel = "stylesheet" type = "text/css" media = "screen" href = "{{ $style.Permalink }}" / >
{{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") (eq .Site.Params.mode "toggle") -}}
{{ $darkstyle := resources.Get "css/dark.css" | fingerprint }}
< 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 } } / >
{{ end }}
<!-- Mathjax support -->
{{ with .Site.Params.mathjax }}
< script type = "text/javascript"
src="{{ .Site.BaseURL }}/js/MathJax.js" integrity="sha384-Ra6zh6uYMmH5ydwCqqMoykyf1T/+ZcnOQfFPhDrp2kI4OIxadnhsvvA2vv9A7xYv">
< / script >
<!-- 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 }}
< link rel = "stylesheet" href = "{{ .Site.BaseURL }}/css/katex.min.css" integrity = "sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" >
< script defer src = "{{ .Site.BaseURL }}/js/katex.min.js" integrity = "sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" < / script >
< script defer src = "{{ .Site.BaseURL }}/js/auto-render.min.js" integrity = "sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05"
onload="renderMathInElement(document.body);">< / script >
<!-- inline KaTeX -->
< script >
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
});
< / script >
{{ end }}
<!-- Custom CSS style get applied last -->
{{- if isset .Site.Params "customcss" }}
{{ range .Site.Params.customCSS }}
{{ $customstyle := resources.Get . | fingerprint }}
< link rel = "stylesheet" type = "text/css" href = "{{ $customstyle.Permalink }}" >
2020-04-22 10:14:28 +00:00
{{ end }}
2023-01-06 20:52:55 +00:00
{{- end -}}
{{- range .Site.Params.customJS }}
{{- if or (hasPrefix . "http://") (hasPrefix . "https://") }}
< script src = "{{ . }}" > < / script >
{{- else if (hasPrefix . "< script " ) } }
{{ .| safeHTML }}
{{- else }}
< script src = "{{ $.Site.BaseURL }}{{ . }}" > < / script >
{{- end }}
{{- end }}
< / head >