1
0
Fork 0
mirror of https://github.com/GuerillaStudio/now-playing synced 2024-11-17 09:11:52 +00:00

Replace resources.ToCSS to css.Sass + stop minify CSS in dev

cf https://gohugo.io/functions/resources/tocss/#:~:text=Deprecated : "Deprecated in v0.128.0. Use css.Sass instead."
This commit is contained in:
Tixie Salander 2024-11-09 03:06:18 +01:00
parent 350b1a8279
commit 41da0e195e
No known key found for this signature in database

View file

@ -51,9 +51,10 @@
{{ $opts := dict
"vars" site.Params.styles
"enableSourceMap" (not hugo.IsProduction)
"minify" (not hugo.IsProduction)
}}
{{ $sass := resources.Get "/scss/style.scss" }}
{{ $style := $sass | resources.ToCSS $opts | minify | fingerprint }}
{{ $style := $sass | css.Sass $opts | fingerprint }}
{{ $secureStyle := $style | resources.Fingerprint "sha512" }}
<link rel="preload" href="{{ $secureStyle.Permalink }}" as="style" />
<link rel="stylesheet" href="{{ $secureStyle.Permalink }}" integrity="{{ $secureStyle.Data.Integrity }}">