42 lines
1.6 KiB
HTML

<head>
<title>{{ .Site.Title }}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="description" content="">
<meta name="author" content="">
{{ if .Site.Params.favicon }}
{{ partial "favicon" }}
{{ end }}
<!-- CSS -->
{{ $opts := dict "targetPath" "css/main.css" "enableSourceMap" (not hugo.IsProduction) }}
{{ $sass := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | toCSS $opts }}
{{ $css := resources.Match "css/*.css" | resources.Concat "css/bundle.css" }}
{{ with slice $sass $css | resources.Concat "css/main.css" }}
{{ if hugo.IsDevelopment }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{ else }}
{{ with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ end }}
{{ end }}
{{ with resources.Get "sass/noscript.scss" }}
{{ $opts := dict "targetPath" "css/noscript.css" "enableSourceMap" (not hugo.IsProduction) }}
{{ with . | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS $opts }}
{{ if hugo.IsDevelopment }}
<noscript>
<link rel="stylesheet" href="{{ .RelPermalink }}">
</noscript>
{{ else }}
{{ with . | minify | fingerprint }}
<noscript>
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
</noscript>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</head>