quartz/layouts/partials/head.html
Adam Gospodarczyk f12559faaa 2022/08/16
2022-08-16 10:46:02 +02:00

66 lines
3.0 KiB
HTML

<head>
<!-- Meta tags -->
<meta charset="UTF-8">
<meta name="description" content="{{if .IsHome}}{{$.Site.Data.config.description}}{{else}}{{.Summary}}{{end}}">
<title>{{ if .Title }}{{ .Title }}{{ else }}{{ $.Site.Data.config.page_title }}{{ end }} - brain.overment.com</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="https://overment.com/icon.png" />
<meta property="og:title" content="Everything I know">
<meta property="og:site_name" content="brain.overment.com">
<meta property="og:url" content="https://brain.overment.com">
<meta property="og:description" content="This is where I share everything I know with you. I created it primarily for myself, so that I can easily return to all the material posted here. At the same time, I thought you might find it all equally valuable to you.">
<meta property="og:type" content="website">
<meta property="og:image" content="https://space.overment.com/brain-en-3UyMg/brain-en.png">
<!-- CSS Stylesheets and Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,900;1,900&family=Poppins:ital,wght@0,300;0,500;0,700;1,300;1,500;1,700&display=swap" rel="stylesheet">
{{$sass := resources.Match "styles/[!_]*.scss" }}
{{$css := slice }}
{{range $sass}}
{{$scss := . | resources.ToCSS (dict "outputStyle" "compressed") }}
{{$css = $css | append $scss}}
{{end}}
{{$finalCss := $css | resources.Concat "styles.css" | resources.Fingerprint "md5" | resources.Minify }}
<link href="{{$finalCss.Permalink}}" rel="stylesheet">
<!-- {{ $darkMode := resources.Get "js/darkmode.js" | resources.Fingerprint "md5" | resources.Minify }}-->
<!-- <script src="{{$darkMode.Permalink}}"></script>-->
{{partial "katex.html" .}}
<!-- Preload page vars -->
{{$linkIndex := resources.Get "indices/linkIndex.json" | resources.Fingerprint "md5" | resources.Minify | }}
{{$contentIndex := resources.Get "indices/contentIndex.json" | resources.Fingerprint "md5" | resources.Minify }}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-99920491-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-99920491-1');
</script>
<script>
const BASE_URL = {{.Site.BaseURL}}
const fetchData = Promise.all([
fetch("{{ $linkIndex.Permalink }}")
.then(data => data.json())
.then(data => ({
index: data.index,
links: data.links,
})),
fetch("{{ $contentIndex.Permalink }}")
.then(data => data.json()),
])
.then(([{index, links}, content]) => {
return {
index,
links,
content,
}
})
</script>
</head>