Skip to content

Commit 759cc94

Browse files
authored
Fix deprecation warnings (#913)
### Prerequisites Put an `x` into the box(es) that apply: - [x] This pull request fixes warnings. - [ ] This pull request adds a feature. - [ ] This pull request introduces breaking change. ### Description This PR fixes warnings emitted by hugo. It raises the min required version for the theme to 0.124.0, I hope this is o.k. for you. #### Contributors - [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already
1 parent f850eb8 commit 759cc94

11 files changed

+18
-17
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# http://editorconfig.org
1+
# https://editorconfig.org
22

33
# this file is the top-most editorconfig file
44
root = true

CONTRIBUTORS.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,5 @@
142142
- [Shaked8634](https://github.com/shaked8634)
143143
- [Leo Heimann Ruiz](https://leo.heitmannruiz.org/)
144144
- [Antoine "Toinux" Wam](https://github.com/itzwam)
145-
- [Reberti Carvalho Soares](https://github.com/RebertiCS)
145+
- [Reberti Carvalho Soares](https://github.com/RebertiCS)
146+
- [Andreas Deininger](https://github.com/deining)

config.toml renamed to hugo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ baseURL = "https://example.com/"
22

33
[module]
44
[module.hugoVersion]
5-
min = "0.77.0"
5+
min = "0.124.0"

i18n/de.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ other = "{{ .Count }} Minuten Lesezeit"
2525
other = "Seite nicht gefunden"
2626

2727
[page_does_not_exist]
28-
other = "Tut mir Leid, die Seite existiert leider nicht."
28+
other = "Tut mir leid, die Seite existiert leider nicht."
2929

3030
[head_back]
3131
other = "Du kannst hier zurück zur <a href=\"{{ . }}\">Startseite</a>."
@@ -61,4 +61,4 @@ other = "Warnung"
6161
other = "Fehler"
6262

6363
[link_to_heading]
64-
other = "Link to heading"
64+
other = "Link zu Überschrift"

layouts/_default/baseof.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{{ if not .Site.Params.hideColorSchemeToggle }}
3838
{{ errorf "Invalid configuration. Default JS scripts are disabled, but 'hideColorSchemeToggle' is false." }}
3939
{{end}}
40-
{{ else if .Site.IsServer }}
40+
{{ else if hugo.IsServer }}
4141
{{ $script := resources.Get "js/coder.js" }}
4242
<script src="{{ $script.RelPermalink }}"></script>
4343
{{ else }}
@@ -46,7 +46,7 @@
4646
{{ end }}
4747

4848
{{ range .Site.Params.customJS }}
49-
{{ if $.Site.IsServer }}
49+
{{ if hugo.IsServer }}
5050
{{ $script := resources.Get . }}
5151
<script src="{{ $script.RelPermalink }}"></script>
5252
{{ else }}
@@ -56,7 +56,7 @@
5656
{{ end }}
5757

5858
{{ range .Site.Params.customRemoteJS }}
59-
{{ if $.Site.IsServer }}
59+
{{ if hugo.IsServer }}
6060
{{ $script := resources.GetRemote . }}
6161
<script src="{{ $script.RelPermalink }}"></script>
6262
{{ else }}

layouts/partials/head/color-scheme.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ if or (eq .Site.Params.colorScheme "auto") (eq .Site.Params.colorScheme "dark") }}
2-
{{ if .Site.IsServer }}
2+
{{ if hugo.IsServer }}
33
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }}
44
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }}
55
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">

layouts/partials/head/custom-styles.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ range .Site.Params.customCSS }}
2-
{{ if $.Site.IsServer }}
2+
{{ if hugo.IsServer }}
33
{{ $styles := resources.Get . }}
44
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
55
{{ else }}
@@ -10,7 +10,7 @@
1010

1111
{{ range .Site.Params.customSCSS }}
1212
{{/* We don't change the targetPath to because it's transparent to users */}}
13-
{{ if $.Site.IsServer }}
13+
{{ if hugo.IsServer }}
1414
{{ $cssOpts := (dict "enableSourceMap" true ) }}
1515
{{ $styles := resources.Get . | toCSS $cssOpts }}
1616
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">

layouts/partials/head/theme-styles.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<link rel="preload" href="/fonts/fa-regular-400.woff2" as="font" type="font/woff2" crossorigin>
33
<link rel="preload" href="/fonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin>
44

5-
{{ if .Site.IsServer }}
5+
{{ if hugo.IsServer }}
66
{{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }}
77
{{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts }}
88
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
@@ -13,7 +13,7 @@
1313
{{ end }}
1414

1515
{{ if .Site.Params.rtl }}
16-
{{ if .Site.IsServer }}
16+
{{ if hugo.IsServer }}
1717
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" "enableSourceMap" true ) }}
1818
{{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts }}
1919
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">

layouts/partials/header.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ .Title }}
66
</a>
77
{{ end }}
8-
{{ if or .Site.Menus.main .Site.IsMultiLingual }}
8+
{{ if or .Site.Menus.main hugo.IsMultilingual }}
99
<input type="checkbox" id="menu-toggle" />
1010
<label class="menu-button float-right" for="menu-toggle">
1111
<i class="fa-solid fa-bars fa-fw" aria-hidden="true"></i>
@@ -18,7 +18,7 @@
1818
</li>
1919
{{ end }}
2020
{{ end }}
21-
{{ if .Site.IsMultiLingual }}
21+
{{ if hugo.IsMultilingual }}
2222
{{ $node := . }}
2323
{{ .Scratch.Set "separator" true }}
2424
{{ range (default .Site.Home.AllTranslations .Translations) }}

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ publish = "exampleSite/public"
33
command = "cd exampleSite && hugo --themesDir=../.. --baseURL $URL"
44

55
[build.environment]
6-
HUGO_VERSION = "0.124.1"
6+
HUGO_VERSION = "0.126.1"
77
HUGO_THEME = "repo"
88

99
[context.deploy-preview]

theme.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ features = [
2121
"single-column",
2222
"syntax-highlighting"
2323
]
24-
min_version = "0.120.0"
24+
min_version = "0.124.0"
2525

2626
[author]
2727
name = "Luiz F. A. de Prá"

0 commit comments

Comments
 (0)