aboutsummaryrefslogtreecommitdiff
path: root/themes/docsy/layouts/partials/head-css.html
blob: 603da38615af7fcfecdae4839f03fc4c87e33f7c (plain)
1
2
3
4
5
6
7
8
9
10
11

{{ $scssMain := "scss/main.scss"}}
{{ if .Site.IsServer }}
{{/* Note the missing postCSS. This makes it snappier to develop in Chrome, but makes it look sub-optimal in other browsers. */}}
{{ $css := resources.Get $scssMain | toCSS (dict "enableSourceMap" true) }}
<link href="{{ $css.RelPermalink }}" rel="stylesheet">
{{ else }}
{{ $css := resources.Get $scssMain | toCSS (dict "enableSourceMap" false) | postCSS | minify | fingerprint }}
<link rel="preload" href="{{ $css.RelPermalink }}" as="style">
<link href="{{ $css.RelPermalink }}" rel="stylesheet" integrity="{{ $css.Data.integrity }}">
{{ end }}