1
Fork 0

Only convert scss files to css

This is a getaround for https://github.com/gohugoio/hugo/issues/7207, which whilst poerhaps correct shouldn't be necessary
This commit is contained in:
Jake Howard 2020-04-29 12:03:02 +01:00
parent 27f1f51eda
commit 56658a4d27
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -1,2 +1,8 @@
{{ $style := resources.Get . | toCSS | minify | fingerprint }}
{{ $style := resources.Get . }}
{{ if strings.HasSuffix . ".scss" }}
{{ $style = toCSS $style }}
{{ end }}
{{ $style = minify $style | fingerprint}}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" />