<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>{{ .Title }}</title>
		{{ if and (.Site.Params.gtm_id) (templates.Exists "partials/gtm.html") }}{{- partial "gtm.html" . }}{{ end }}

	{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
	{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
	
	{{- $cache :=  now.Unix -}}
	{{- $opt := (dict "outputStyle" "compressed" "enableSourceMap" "true") -}}
	{{- $style := resources.Get "sass/main.scss" | toCSS $opt | minify -}}
	<link rel="stylesheet" type="text/css" href="{{ $style.Permalink }}?{{ $cache }}"/>

	{{ with .OutputFormats.Get "RSS" -}}
		{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
	{{- end }}

	<!-- github buttons -->
	<script async defer src="https://buttons.github.io/buttons.js"></script>
	<script type="text/javascript" src="//cdn.bizible.com/scripts/bizible.js" async=""></script>
</head>
<body>
	{{ if .Site.Params.gtm_id}}
		<noscript>
			<iframe src="//www.googletagmanager.com/ns.html?id={{ .Site.Params.gtm_id }}" height="0" width="0" style="display:none;visibility:hidden">
			</iframe>
		</noscript>
	{{ end }}
	{{ partial "header" . }}
	{{ block "main" . }}{{ end }}
	{{ partial "footer" . }}
</body>
</html>