mirror of https://github.com/luizdepra/hugo-coder.git

Andreas Deininger
17.45.2024 759cc945636473d251a28597e2007cbb7d11631d
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
10 files modified
1 files renamed
33 ■■■■ changed files
.editorconfig 2 ●●● patch | view | raw | blame | history
CONTRIBUTORS.md 1 ●●●● patch | view | raw | blame | history
hugo.toml 2 ●●● patch | view | raw | blame | history
i18n/de.toml 4 ●●●● patch | view | raw | blame | history
layouts/_default/baseof.html 6 ●●●● patch | view | raw | blame | history
layouts/partials/head/color-scheme.html 2 ●●● patch | view | raw | blame | history
layouts/partials/head/custom-styles.html 4 ●●●● patch | view | raw | blame | history
layouts/partials/head/theme-styles.html 4 ●●●● patch | view | raw | blame | history
layouts/partials/header.html 4 ●●●● patch | view | raw | blame | history
netlify.toml 2 ●●● patch | view | raw | blame | history
theme.toml 2 ●●● patch | view | raw | blame | history
.editorconfig
@@ -1,4 +1,4 @@
# http://editorconfig.org
# https://editorconfig.org
# this file is the top-most editorconfig file
root = true
CONTRIBUTORS.md
@@ -143,3 +143,4 @@
- [Leo Heimann Ruiz](https://leo.heitmannruiz.org/)
- [Antoine "Toinux" Wam](https://github.com/itzwam)
- [Reberti Carvalho Soares](https://github.com/RebertiCS)
- [Andreas Deininger](https://github.com/deining)
hugo.toml
File was renamed from config.toml
@@ -2,4 +2,4 @@
[module]
[module.hugoVersion]
min = "0.77.0"
min = "0.124.0"
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"
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 }}
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">
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">
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">
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) }}
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]
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á"