mirror of
https://github.com/GuerillaStudio/now-playing
synced 2024-11-17 13: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:
parent
350b1a8279
commit
41da0e195e
1 changed files with 2 additions and 1 deletions
|
@ -51,9 +51,10 @@
|
||||||
{{ $opts := dict
|
{{ $opts := dict
|
||||||
"vars" site.Params.styles
|
"vars" site.Params.styles
|
||||||
"enableSourceMap" (not hugo.IsProduction)
|
"enableSourceMap" (not hugo.IsProduction)
|
||||||
|
"minify" (not hugo.IsProduction)
|
||||||
}}
|
}}
|
||||||
{{ $sass := resources.Get "/scss/style.scss" }}
|
{{ $sass := resources.Get "/scss/style.scss" }}
|
||||||
{{ $style := $sass | resources.ToCSS $opts | minify | fingerprint }}
|
{{ $style := $sass | css.Sass $opts | fingerprint }}
|
||||||
{{ $secureStyle := $style | resources.Fingerprint "sha512" }}
|
{{ $secureStyle := $style | resources.Fingerprint "sha512" }}
|
||||||
<link rel="preload" href="{{ $secureStyle.Permalink }}" as="style" />
|
<link rel="preload" href="{{ $secureStyle.Permalink }}" as="style" />
|
||||||
<link rel="stylesheet" href="{{ $secureStyle.Permalink }}" integrity="{{ $secureStyle.Data.Integrity }}">
|
<link rel="stylesheet" href="{{ $secureStyle.Permalink }}" integrity="{{ $secureStyle.Data.Integrity }}">
|
||||||
|
|
Loading…
Reference in a new issue