theme(fix): replace deprecated resources.ToCSS with css.Sass
fixes #712 Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
This commit is contained in:
parent
9a0a974089
commit
321680f6ee
|
@ -49,7 +49,7 @@ css asset directory we (unless condition below) add to aforementioned slice */}}
|
||||||
{{ if eq .MediaType.SubType "x-scss" "x-sass" "scss" "sass" }}
|
{{ if eq .MediaType.SubType "x-scss" "x-sass" "scss" "sass" }}
|
||||||
{{ if hugo.IsExtended }}
|
{{ if hugo.IsExtended }}
|
||||||
{{/* as we cannot concatenate styles of different types, we sass/scss to be transformed to css beforehand */}}
|
{{/* as we cannot concatenate styles of different types, we sass/scss to be transformed to css beforehand */}}
|
||||||
{{ $assets_to_concat = $assets_to_concat | append (. | resources.ToCSS) }}
|
{{ $assets_to_concat = $assets_to_concat | append (. | css.Sass) }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "func/warn" (printf "Processing of stylesheet %s of type %s has been skipped. You need Hugo Extended to process such files." .Name .MediaType.SubType) }}
|
{{ partial "func/warn" (printf "Processing of stylesheet %s of type %s has been skipped. You need Hugo Extended to process such files." .Name .MediaType.SubType) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -66,7 +66,7 @@ css asset directory we (unless condition below) add to aforementioned slice */}}
|
||||||
|
|
||||||
{{/* We then use toCSS to add sourceMap and minify */}}
|
{{/* We then use toCSS to add sourceMap and minify */}}
|
||||||
{{ $options := dict "enableSourceMap" true "precision" 6 }}
|
{{ $options := dict "enableSourceMap" true "precision" 6 }}
|
||||||
{{ $style = $style | resources.ToCSS $options | minify }}
|
{{ $style = $style | css.Sass $options | minify }}
|
||||||
{{/* We fingerprint in production for cache busting purposes */}}
|
{{/* We fingerprint in production for cache busting purposes */}}
|
||||||
{{ if eq (getenv "HUGO_ENV") "production" }}
|
{{ if eq (getenv "HUGO_ENV") "production" }}
|
||||||
{{ $style = $style | fingerprint }}
|
{{ $style = $style | fingerprint }}
|
||||||
|
|
Loading…
Reference in a new issue