summaryrefslogtreecommitdiffstats
path: root/layouts/partials
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2024-09-26 20:58:46 +0200
committerSerghei Iakovlev <git@serghei.pl>2024-09-26 21:05:09 +0200
commiteed4fc705e692157ea27994c20bb91c36750fc4e (patch)
tree1c3c62f1969ad7ed693b53da8adeb7bc35411b20 /layouts/partials
parent0261be16e89a29fda7e86ff90e7ea42153c1d025 (diff)
downloadgohugo-theme-ed-eed4fc705e692157ea27994c20bb91c36750fc4e.tar.gz
Correct css.Sass usage
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/styles.html9
1 files changed, 8 insertions, 1 deletions
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 ... */}}