From 316562f10a8ee3bd9401bb3bd82776da1cc3728a Mon Sep 17 00:00:00 2001
From: Markus Bilz <github@markusbilz.com>
Date: Sun, 04 Oct 2026 14:09:37 +0000
Subject: [PATCH] chore: fix hugo deprecation warnings (hugo 0.167.0) (#604)
---
i18n/ar.toml | 3 +++
.devcontainer/Dockerfile | 23 ++++++++++++-----------
.github/workflows/update-resources.yml | 4 ++--
i18n/en.toml | 3 +++
theme.toml | 2 +-
layouts/partials/navbar.html | 8 ++++----
exampleSite/config/_default/languages.toml | 4 ++--
netlify.toml | 2 +-
i18n/de.toml | 3 +++
9 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 0c10c9b..c1aff25 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -5,33 +5,34 @@
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
ARG VARIANT=hugo_extended
# VERSION can be either 'latest' or a specific version number
-ARG HUGO_VERSION="0.158.0"
+ARG HUGO_VERSION="0.167.0"
ARG DART_SASS_VERSION="1.99.0"
-# Download Hugo
-RUN apt-get update && apt-get install -y ca-certificates openssl git curl && \
+# Download Dart Sass and Hugo
+RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl git openssl && \
rm -rf /var/lib/apt/lists/* && \
- case $(uname -m) in \
+ case "$(uname -m)" in \
aarch64) \
export ARCH=arm64 ;; \
*) \
export ARCH=x64 ;; \
esac && \
- echo ${ARCH} && \
- curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-${ARCH}.tar.gz && \
- tar -xf dart-sass-${DART_SASS_VERSION}-linux-${ARCH}.tar.gz && \
+ echo "${ARCH}" && \
+ curl --proto "=https" --tlsv1.2 -fsSL -o dart-sass.tar.gz "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-${ARCH}.tar.gz" && \
+ tar -xf dart-sass.tar.gz && \
cp -r dart-sass/* /usr/local/bin && \
rm -rf dart-sass* && \
- case $(uname -m) in \
+ case "$(uname -m)" in \
aarch64) \
export ARCH=arm64 ;; \
*) \
export ARCH=amd64 ;; \
esac && \
- echo ${ARCH} && \
- wget -O ${HUGO_VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${VARIANT}_${HUGO_VERSION}_linux-${ARCH}.tar.gz && \
- tar xf ${HUGO_VERSION}.tar.gz && \
+ echo "${ARCH}" && \
+ curl --proto "=https" --tlsv1.2 -fsSL -o hugo.tar.gz "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${VARIANT}_${HUGO_VERSION}_linux-${ARCH}.tar.gz" && \
+ tar -xf hugo.tar.gz hugo && \
+ rm hugo.tar.gz && \
mv hugo /usr/bin/hugo
# Hugo dev server port
EXPOSE 1313
diff --git a/.github/workflows/update-resources.yml b/.github/workflows/update-resources.yml
index 10f3349..57ac0a5 100644
--- a/.github/workflows/update-resources.yml
+++ b/.github/workflows/update-resources.yml
@@ -17,14 +17,14 @@
uses: peaceiris/actions-hugo@v3
with:
extended: true
- hugo-version: 0.158.0
+ hugo-version: 0.167.0
- name: setup node
uses: actions/setup-node@v6
with:
node-version: 24
- name: install
run: |
- npm ci
+ npm ci --ignore-scripts
npm run prepare
- name: clean resources
run: |
diff --git a/exampleSite/config/_default/languages.toml b/exampleSite/config/_default/languages.toml
index 346d785..6a63c5e 100644
--- a/exampleSite/config/_default/languages.toml
+++ b/exampleSite/config/_default/languages.toml
@@ -1,7 +1,7 @@
[en]
title = "My blog"
weight = 1
-LanguageName = "EN"
+label = "EN"
contentDir = "content/english"
[ar]
@@ -9,6 +9,6 @@
contentDir = "content/arabic"
weight = 2
Direction = "rtl"
-LanguageName = "AR"
+label = "AR"
[ar.params]
description = "أنا أعمل كمطورة ويب في شركة س"
diff --git a/i18n/ar.toml b/i18n/ar.toml
index b90f276..bc3ce95 100644
--- a/i18n/ar.toml
+++ b/i18n/ar.toml
@@ -53,3 +53,6 @@
[toc]
other = "جدول المحتويات"
+
+[ariaLanguage]
+other = "اللغة: "
diff --git a/i18n/de.toml b/i18n/de.toml
index e4f7a0b..3a39790 100644
--- a/i18n/de.toml
+++ b/i18n/de.toml
@@ -56,3 +56,6 @@
[toc]
other = "Inhaltsverzeichnis"
+
+[ariaLanguage]
+other = "Sprache: "
diff --git a/i18n/en.toml b/i18n/en.toml
index eb87fa2..ab0cb45 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -56,3 +56,6 @@
[toc]
other = "Table of contents"
+
+[ariaLanguage]
+other = "Language: "
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html
index d51d777..bea33f1 100644
--- a/layouts/partials/navbar.html
+++ b/layouts/partials/navbar.html
@@ -77,19 +77,19 @@
<div class="optionswitch">
<input class="optionswitch__picker" type="checkbox" id="languagepicker" hidden />
<label class="optionswitch__label" for="languagepicker"
- >{{ .Site.Language.LanguageName }} <i class="fa fa-angle-down" aria-hidden="true"></i
+ >{{ .Site.Language.Label }} <i class="fa fa-angle-down" aria-hidden="true"></i
></label>
<div class="optionswitch__triangle"></div>
<ul class="optionswitch__list">
{{ range $.Translations }}
<li class="optionswitch__list-item">
- <a href="{{ .RelPermalink }}" title="{{ .Language.LanguageName }}"
+ <a href="{{ .RelPermalink }}" title="{{ .Language.Label }}"
><span
{{ if eq . $.Site.Language }}
class="active"
{{ end }}
- aria-label="{{ i18n "ariaLanguage" }}{{ .Language.LanguageName }}"
- >{{ .Language.LanguageName }}</span
+ aria-label="{{ i18n "ariaLanguage" }}{{ .Language.Label }}"
+ >{{ .Language.Label }}</span
>
</a>
</li>
diff --git a/netlify.toml b/netlify.toml
index 59ba3f6..11531f0 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -10,7 +10,7 @@
"""
[build.environment]
- HUGO_VERSION = "0.161.1"
+ HUGO_VERSION = "0.167.0"
DART_SASS_VERSION = "1.99.0"
NODE_VERSION = "26"
GO_VERSION = "1.26.3"
diff --git a/theme.toml b/theme.toml
index 01342ac..cac8026 100644
--- a/theme.toml
+++ b/theme.toml
@@ -9,7 +9,7 @@
demosite = "https://anatole-demo.netlify.app/"
tags = ["blog", "responsive", "clean", "minimalist", "minimal", "personal", "dark"]
features = ["blog", "seo", "responsive", "mobile", "disqus", "fontawesome", "analytics", "math"]
-min_version = "0.128.0"
+min_version = "0.158.0"
[author]
name = "Alexander Bilz"
--
Gitblit v1.10.0