{{define "cacheBust" -}}
	{{- if fileExists "/.commit-hash" -}}
		{{- $commitHash := (include "/.commit-hash") -}}
		{{- trim (printf "?v=%v" $commitHash) -}}
	{{- end -}}
{{- end}}

{{define "head"}}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="icon" href="/resources/images/favicon.png{{template "cacheBust"}}">

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Gantari:wght@400..800&family=Figtree:wght@300..900&&family=JetBrains+Mono:wght@400..600&family=Inter:wght@400..600&family=Poppins:wght@400;500;600;700;800&family=Albert+Sans:wght@400..600&display=swap" rel="stylesheet">

<link rel="stylesheet" href="/resources/css/common.css{{template "cacheBust"}}">
<link rel="stylesheet" href="/resources/css/chroma.css{{template "cacheBust"}}">

<script src="/resources/js/lib.js{{template "cacheBust"}}"></script>
<script src="/resources/js/common.js{{template "cacheBust"}}"></script>

<!-- General metatags -->
<meta name="author" content="Caddy Web Server">
<meta name="description" content="Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go">
<meta name="theme-color" content="#1b3143">

<!-- Open Graph tags -->
<meta property="og:type" content="website">
<meta property="og:title" content="Caddy - The Ultimate Server with Automatic HTTPS">
<meta property="og:site_name" content="Caddy Web Server">
<meta property="og:url" content="https://{{.Req.Host}}{{.OriginalReq.URL}}">
<meta property="og:description" content="Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go">
<meta property="og:image" content="https://{{.Req.Host}}/resources/images/open-graph-square.png{{template "cacheBust"}}">

<!-- Global site tag (gtag.js) - Google Analytics (ZeroSSL) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2DLB04LK4P"></script>
<script>
	window.dataLayer = window.dataLayer || [];
	function gtag(){dataLayer.push(arguments);}
	gtag('js', new Date());
	gtag('config', 'G-2DLB04LK4P');
</script>
{{end}}
