From 759cc945636473d251a28597e2007cbb7d11631d Mon Sep 17 00:00:00 2001
From: Andreas Deininger <andreas@deininger.net>
Date: Fri, 17 May 2024 19:45:40 +0000
Subject: [PATCH] Fix deprecation warnings (#913)
---
layouts/_default/baseof.html | 6 +++---
hugo.toml | 2 +-
layouts/partials/head/color-scheme.html | 2 +-
theme.toml | 2 +-
layouts/partials/head/custom-styles.html | 4 ++--
layouts/partials/header.html | 4 ++--
.editorconfig | 2 +-
CONTRIBUTORS.md | 3 ++-
layouts/partials/head/theme-styles.html | 4 ++--
netlify.toml | 2 +-
i18n/de.toml | 4 ++--
11 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/.editorconfig b/.editorconfig
index d5add1a..51c74a1 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,4 @@
-# http://editorconfig.org
+# https://editorconfig.org
# this file is the top-most editorconfig file
root = true
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 43ec4a7..139f039 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -142,4 +142,5 @@
- [Shaked8634](https://github.com/shaked8634)
- [Leo Heimann Ruiz](https://leo.heitmannruiz.org/)
- [Antoine "Toinux" Wam](https://github.com/itzwam)
-- [Reberti Carvalho Soares](https://github.com/RebertiCS)
\ No newline at end of file
+- [Reberti Carvalho Soares](https://github.com/RebertiCS)
+- [Andreas Deininger](https://github.com/deining)
diff --git a/config.toml b/hugo.toml
similarity index 79%
rename from config.toml
rename to hugo.toml
index 62b395a..0c39f53 100644
--- a/config.toml
+++ b/hugo.toml
@@ -2,4 +2,4 @@
[module]
[module.hugoVersion]
-min = "0.77.0"
\ No newline at end of file
+min = "0.124.0"
diff --git a/i18n/de.toml b/i18n/de.toml
index 521fe0f..adbc635 100644
--- a/i18n/de.toml
+++ b/i18n/de.toml
@@ -25,7 +25,7 @@
other = "Seite nicht gefunden"
[page_does_not_exist]
-other = "Tut mir Leid, die Seite existiert leider nicht."
+other = "Tut mir leid, die Seite existiert leider nicht."
[head_back]
other = "Du kannst hier zurück zur <a href=\"{{ . }}\">Startseite</a>."
@@ -61,4 +61,4 @@
other = "Fehler"
[link_to_heading]
-other = "Link to heading"
+other = "Link zu Überschrift"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 8b8bffd..3b06b31 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -37,7 +37,7 @@
{{ if not .Site.Params.hideColorSchemeToggle }}
{{ errorf "Invalid configuration. Default JS scripts are disabled, but 'hideColorSchemeToggle' is false." }}
{{end}}
- {{ else if .Site.IsServer }}
+ {{ else if hugo.IsServer }}
{{ $script := resources.Get "js/coder.js" }}
<script src="{{ $script.RelPermalink }}"></script>
{{ else }}
@@ -46,7 +46,7 @@
{{ end }}
{{ range .Site.Params.customJS }}
- {{ if $.Site.IsServer }}
+ {{ if hugo.IsServer }}
{{ $script := resources.Get . }}
<script src="{{ $script.RelPermalink }}"></script>
{{ else }}
@@ -56,7 +56,7 @@
{{ end }}
{{ range .Site.Params.customRemoteJS }}
- {{ if $.Site.IsServer }}
+ {{ if hugo.IsServer }}
{{ $script := resources.GetRemote . }}
<script src="{{ $script.RelPermalink }}"></script>
{{ else }}
diff --git a/layouts/partials/head/color-scheme.html b/layouts/partials/head/color-scheme.html
index 7a55e8e..18e2d79 100644
--- a/layouts/partials/head/color-scheme.html
+++ b/layouts/partials/head/color-scheme.html
@@ -1,5 +1,5 @@
{{ if or (eq .Site.Params.colorScheme "auto") (eq .Site.Params.colorScheme "dark") }}
- {{ if .Site.IsServer }}
+ {{ if hugo.IsServer }}
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }}
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
diff --git a/layouts/partials/head/custom-styles.html b/layouts/partials/head/custom-styles.html
index 6496963..8907026 100644
--- a/layouts/partials/head/custom-styles.html
+++ b/layouts/partials/head/custom-styles.html
@@ -1,5 +1,5 @@
{{ range .Site.Params.customCSS }}
- {{ if $.Site.IsServer }}
+ {{ if hugo.IsServer }}
{{ $styles := resources.Get . }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
{{ else }}
@@ -10,7 +10,7 @@
{{ range .Site.Params.customSCSS }}
{{/* We don't change the targetPath to because it's transparent to users */}}
- {{ if $.Site.IsServer }}
+ {{ if hugo.IsServer }}
{{ $cssOpts := (dict "enableSourceMap" true ) }}
{{ $styles := resources.Get . | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
diff --git a/layouts/partials/head/theme-styles.html b/layouts/partials/head/theme-styles.html
index a208a90..2bb8f88 100644
--- a/layouts/partials/head/theme-styles.html
+++ b/layouts/partials/head/theme-styles.html
@@ -2,7 +2,7 @@
<link rel="preload" href="/fonts/fa-regular-400.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin>
-{{ if .Site.IsServer }}
+{{ if hugo.IsServer }}
{{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }}
{{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
@@ -13,7 +13,7 @@
{{ end }}
{{ if .Site.Params.rtl }}
- {{ if .Site.IsServer }}
+ {{ if hugo.IsServer }}
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" "enableSourceMap" true ) }}
{{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 22ac243..0e8ca70 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -5,7 +5,7 @@
{{ .Title }}
</a>
{{ end }}
- {{ if or .Site.Menus.main .Site.IsMultiLingual }}
+ {{ if or .Site.Menus.main hugo.IsMultilingual }}
<input type="checkbox" id="menu-toggle" />
<label class="menu-button float-right" for="menu-toggle">
<i class="fa-solid fa-bars fa-fw" aria-hidden="true"></i>
@@ -18,7 +18,7 @@
</li>
{{ end }}
{{ end }}
- {{ if .Site.IsMultiLingual }}
+ {{ if hugo.IsMultilingual }}
{{ $node := . }}
{{ .Scratch.Set "separator" true }}
{{ range (default .Site.Home.AllTranslations .Translations) }}
diff --git a/netlify.toml b/netlify.toml
index cee9682..560742e 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -3,7 +3,7 @@
command = "cd exampleSite && hugo --themesDir=../.. --baseURL $URL"
[build.environment]
-HUGO_VERSION = "0.124.1"
+HUGO_VERSION = "0.126.1"
HUGO_THEME = "repo"
[context.deploy-preview]
diff --git a/theme.toml b/theme.toml
index ebe5716..80c3f0e 100644
--- a/theme.toml
+++ b/theme.toml
@@ -21,7 +21,7 @@
"single-column",
"syntax-highlighting"
]
-min_version = "0.120.0"
+min_version = "0.124.0"
[author]
name = "Luiz F. A. de Prá"
--
Gitblit v1.10.0