Fix deprecation warning emitted from hugo 0.128.x

This commit is contained in:
Andreas Deininger 2024-07-02 21:29:19 +02:00
parent b05c4ffd70
commit 195a94e675
3 changed files with 6 additions and 4 deletions

2
exampleSite/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.hugo_build.lock
resources/

View File

@ -9,14 +9,14 @@
{{ end }}
<!-- CSS -->
{{ 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) }}
<link rel="stylesheet" href="{{ ($style).RelPermalink }}">
{{ else }}
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "css/main.css" "enableSourceMap" false) }}
<link rel="stylesheet" href="{{ ($style | minify).RelPermalink }}">
{{ 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) }}
<noscript><link rel="stylesheet" href="{{ ($noscript).RelPermalink }}" /></noscript>
{{ else }}

View File

@ -9,14 +9,14 @@
{{ end }}
<!-- CSS -->
{{ 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) }}
<link rel="stylesheet" href="{{ ($style).RelPermalink }}">
{{ else }}
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "css/main.css" "enableSourceMap" false) }}
<link rel="stylesheet" href="{{ ($style | minify).RelPermalink }}">
{{ 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) }}
<noscript><link rel="stylesheet" href="{{ ($noscript).RelPermalink }}" /></noscript>
{{ else }}