From 83ec297e26307a3cea7f33f0b0fdb3dabbb93967 Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Mon, 24 Nov 2025 17:26:08 +0100 Subject: [PATCH] hugo: bump version to 0.147.8, address deprecations This change bumps the Hugo version used to build web pages to v0.147.8 and addresses build issues introduced by functions deprecated in newer hugo versions: - .Site.IsMultiLingual => hugo.IsMultilingual - resources.ToCSS => css.Sass Templates and partials that use deprecated functions are now overridden in layout/. The Hugo version was bumped in gh-pages.yml. Signed-off-by: Thilo Fromm --- .github/workflows/gh-pages.yml | 2 +- layouts/404.html | 35 ++++++++++++++++++++++ layouts/partials/docs/footer.html | 25 ++++++++++++++++ layouts/partials/docs/html-head.html | 43 ++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 layouts/404.html create mode 100644 layouts/partials/docs/footer.html create mode 100644 layouts/partials/docs/html-head.html diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 3ef8ece..98a394a 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.104.3' + hugo-version: '0.147.8' extended: true - name: Build diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..60dcdc6 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,35 @@ + + + + + {{ partial "docs/html-head" . }} + {{ partial "docs/inject/head" . }} + + + + + +
+
+

404

+

Page Not Found

+

+ {{ .Site.Title }} +

+
+
+ + {{ partial "docs/inject/body" . }} + {{ template "_internal/google_analytics.html" . }} + + + diff --git a/layouts/partials/docs/footer.html b/layouts/partials/docs/footer.html new file mode 100644 index 0000000..c97b67f --- /dev/null +++ b/layouts/partials/docs/footer.html @@ -0,0 +1,25 @@ +
+{{ if hugo.IsMultilingual }} + {{ partial "docs/languages" . }} +{{ end }} + +{{ if and .GitInfo .Site.Params.BookRepo }} +
+ {{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} + {{- $commitPath := default "commit" .Site.Params.BookCommitPath -}} + + Calendar + {{ $date }} + +
+{{ end }} + +{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }} +
+ + Edit + {{ i18n "Edit this page" }} + +
+{{ end }} +
diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html new file mode 100644 index 0000000..b24730d --- /dev/null +++ b/layouts/partials/docs/html-head.html @@ -0,0 +1,43 @@ + + + + + +{{- template "_internal/opengraph.html" . -}} + +{{ partial "docs/title" . }} | {{ .Site.Title -}} + +{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }} + + + +{{- range .Translations }} + +{{ end -}} + + +{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | css.Sass | resources.Minify | resources.Fingerprint }} + + +{{- if default true .Site.Params.BookSearch }} +{{- $searchJSFile := printf "%s.search.js" .Language.Lang }} +{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} + +{{ end -}} + +{{- if .Site.Params.BookServiceWorker }} +{{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }} + +{{ end -}} + +{{- template "_internal/google_analytics.html" . -}} + + +{{- with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}} + +{{ "" | safeHTML }}