From eed4fc705e692157ea27994c20bb91c36750fc4e Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 26 Sep 2024 20:58:46 +0200 Subject: Correct css.Sass usage --- assets/sass/_ed.scss | 2 +- layouts/partials/styles.html | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/assets/sass/_ed.scss b/assets/sass/_ed.scss index a0e0d4f..5173f6d 100644 --- a/assets/sass/_ed.scss +++ b/assets/sass/_ed.scss @@ -62,7 +62,7 @@ body { Wrapper The wrapper is used to position site content when the sidebar is toggled. We use an outter wrap to - position the sidebar without interferring with the regular page content. + position the sidebar without interfering with the regular page content. */ .wrap { diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html index 714677e..d95afbd 100644 --- a/layouts/partials/styles.html +++ b/layouts/partials/styles.html @@ -1,5 +1,12 @@ {{- /* Styles */}} -{{- $theme := resources.Get "sass/style.scss" | css.Sass }} +{{- $theme := resources.Get "sass/style.scss" }} + +{{- /* resources.ToCSS was deprecated in Hugo v0.128.0 and will be removed in a future release */}} +{{- if ge site.Hugo.Version "0.128.0" -}} + {{- $theme = $theme | css.Sass }} +{{- else -}} + {{- $theme = $theme | resources.ToCSS }} +{{- end -}} {{- /* order is important */}} {{- /* to ass more styles use the following format: slice $theme $style1 $style2 $style3 ... */}} -- cgit v1.2.3