mirror of https://github.com/lxndrblz/anatole.git

Markus Bilz
15 hours ago 316562f10a8ee3bd9401bb3bd82776da1cc3728a
chore: fix hugo deprecation warnings (hugo 0.167.0) (#604)

* chore: fix hugo deprecation warnings (hugo 0.165.0)

- Replace deprecated `.Language.LanguageName` with `.Language.Label` in navbar
- Replace deprecated `languageName` config key with `label` in exampleSite
- Add missing `ariaLanguage` i18n key (en, de, ar)
- Bump Hugo to 0.165.0 in CI, Netlify and devcontainer
- Raise theme min_version to 0.158.0 (required for Label/Locale/Direction)

Closes #601

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: resolve sonarcloud findings in devcontainer and CI

- Quote shell variables in Dockerfile (docker:S6570)
- Enforce HTTPS-only downloads via curl --proto "=https" and drop wget (docker:S6506)
- Install apt packages with --no-install-recommends, sorted (docker:S6500, S7018)
- Run npm ci with --ignore-scripts in update-resources workflow (githubactions:S6505)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: bump hugo to 0.167.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
9 files modified
52 ■■■■■ changed files
.devcontainer/Dockerfile 23 ●●●●● patch | view | raw | blame | history
.github/workflows/update-resources.yml 4 ●●●●● patch | view | raw | blame | history
exampleSite/config/_default/languages.toml 4 ●●●●● patch | view | raw | blame | history
i18n/ar.toml 3 ●●●●● patch | view | raw | blame | history
i18n/de.toml 3 ●●●●● patch | view | raw | blame | history
i18n/en.toml 3 ●●●●● patch | view | raw | blame | history
layouts/partials/navbar.html 8 ●●●●● patch | view | raw | blame | history
netlify.toml 2 ●●●●● patch | view | raw | blame | history
theme.toml 2 ●●●●● patch | view | raw | blame | history
.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
.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: |
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 = "أنا أعمل كمطورة ويب في شركة س"
i18n/ar.toml
@@ -53,3 +53,6 @@
[toc]
other = "جدول المحتويات"
[ariaLanguage]
other = "اللغة: "
i18n/de.toml
@@ -56,3 +56,6 @@
[toc]
other = "Inhaltsverzeichnis"
[ariaLanguage]
other = "Sprache: "
i18n/en.toml
@@ -56,3 +56,6 @@
[toc]
other = "Table of contents"
[ariaLanguage]
other = "Language: "
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>
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"
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"