From 84cbf7e9b3e769cd47d69463a5bb40a6bc2bfa31 Mon Sep 17 00:00:00 2001 From: Mirus Date: Wed, 31 Jul 2024 20:12:31 +0300 Subject: [PATCH] chore: remove deprecated resources.ToCSS --- layouts/partials/head.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9352d88..1a49763 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -18,14 +18,15 @@ {{ if and (isset .Params "color") (not (eq .Params.color "")) }} {{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }} {{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }} - {{ $localColorStyles := $localCss | resources.ToCSS }} + {{ $options := dict ("transpiler" "libsass") }} + {{ $localColorStyles := $localCss | css.Sass $options }} {{ else }} - {{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }} + {{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "blue")) }} {{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }} - {{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }} - {{ $styles := $css | resources.ToCSS $options }} + {{ $options := (dict "transpiler" "libsass" "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }} + {{ $styles := $css | css.Sass $options }} {{ end }}