From 56658a4d2702e8f78b56c09b8bfe671dc12f033e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 29 Apr 2020 12:03:02 +0100 Subject: [PATCH] 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 --- layouts/partials/style.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layouts/partials/style.html b/layouts/partials/style.html index 7012e30..51eec69 100644 --- a/layouts/partials/style.html +++ b/layouts/partials/style.html @@ -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}}