{{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="preconnect" href="https://BH4D9OD16A-dsn.algolia.net" crossorigin />

<link rel="icon" href="/old/resources/images/favicon.png{{template "cacheBust"}}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:400,700|Maven+Pro:400,700,900|Montserrat:400,700|PT+Mono&display=swap">
<link rel="stylesheet" href="/old/resources/css/common.css{{template "cacheBust"}}">
<script src="/old/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="#5ea9a2">

<!-- Open Graph tags -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://caddyserver.com/">
<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://caddyserver.com/old/resources/images/caddy-open-graph.jpg">

<!-- Twitter card tags additive with the og: tags -->
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" value="caddyserver.com">
<meta name="twitter:description" value="Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go">
<meta name="twitter:image" content="https://caddyserver.com/old/resources/images/caddy-open-graph.jpg">
<meta name="twitter:url" value="https://caddyserver.com/">

<!-- Algolia DocSearch -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">

<!-- Global site tag (gtag.js) - Google Analytics (Stack Holdings) -->
<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>

<!-- Alpine.js to augment markdown docs -->
<script src="https://cdn.jsdelivr.net/npm/@alpinejs/persist@3.x.x/dist/cdn.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>

<!-- TODO: These don't work -- color values need to be tweaked if they do work -- I think because background-color is set on the body. -->
<meta name="theme-color" content="#123245" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#123245" media="(prefers-color-scheme: dark)">

{{end}}

