Merge pull request #54 from deining/fix-deprecation-warning

Fix deprecation warning emitted from hugo 0.128.x
This commit is contained in:
⚔️ DR ⚔️ 2024-07-23 09:21:57 -04:00 committed by GitHub
commit e3e2b8d867
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 }} {{ end }}
<!-- CSS --> <!-- 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) }} {{ $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 }}"> <link rel="stylesheet" href="{{ ($style).RelPermalink }}">
{{ else }} {{ else }}
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "css/main.css" "enableSourceMap" false) }} {{ $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 }}"> <link rel="stylesheet" href="{{ ($style | minify).RelPermalink }}">
{{ end }} {{ 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 := 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> <noscript><link rel="stylesheet" href="{{ ($noscript).RelPermalink }}" /></noscript>
{{ else }} {{ else }}

View File

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