From 195a94e675ba0b00d756086ba0b614896dbf5b66 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Tue, 2 Jul 2024 21:29:19 +0200 Subject: [PATCH] Fix deprecation warning emitted from hugo 0.128.x --- exampleSite/.gitignore | 2 ++ exampleSite/layouts/partials/head.html | 4 ++-- layouts/partials/head.html | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 exampleSite/.gitignore diff --git a/exampleSite/.gitignore b/exampleSite/.gitignore new file mode 100644 index 0000000..176fad1 --- /dev/null +++ b/exampleSite/.gitignore @@ -0,0 +1,2 @@ +.hugo_build.lock +resources/ \ No newline at end of file diff --git a/exampleSite/layouts/partials/head.html b/exampleSite/layouts/partials/head.html index 6a15e8a..5215b58 100644 --- a/exampleSite/layouts/partials/head.html +++ b/exampleSite/layouts/partials/head.html @@ -9,14 +9,14 @@ {{ end }} - {{ if .Site.IsServer }} + {{ if hugo.IsServer }} {{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "css/main.css" "outputStyle" "compressed" "enableSourceMap" false) }} {{ else }} {{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "css/main.css" "enableSourceMap" false) }} {{ end }} - {{ if .Site.IsServer }} + {{ if hugo.IsServer }} {{ $noscript := resources.Get "sass/noscript.scss" | resources.ExecuteAsTemplate "noscript.scss" . | toCSS (dict "targetPath" "css/noscript.css" "enableSourceMap" false) }} {{ else }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 6a15e8a..5215b58 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -9,14 +9,14 @@ {{ end }} - {{ if .Site.IsServer }} + {{ if hugo.IsServer }} {{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "css/main.css" "outputStyle" "compressed" "enableSourceMap" false) }} {{ else }} {{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "css/main.css" "enableSourceMap" false) }} {{ end }} - {{ if .Site.IsServer }} + {{ if hugo.IsServer }} {{ $noscript := resources.Get "sass/noscript.scss" | resources.ExecuteAsTemplate "noscript.scss" . | toCSS (dict "targetPath" "css/noscript.css" "enableSourceMap" false) }} {{ else }}