From be2eab56619fbbf5889ccd0f0b87042bcbfba37d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 22 Aug 2026 20:35:34 +0200 Subject: [PATCH] Update Blowfish to v2.106.0 The theme was pinned at v2.86.0, which declares that it works with Hugo 0.137.0 to 0.147.5. Hugo has been 0.165.0 here and 0.163.3 in the pinned nixpkgs branch for a while, so every build complained: WARN Module "blowfish" is not compatible with this Hugo version: 0.87.0/0.147.5 WARN deprecated: .Site.LanguageCode was deprecated in Hugo v0.158.0 WARN deprecated: .Site.Data was deprecated in Hugo v0.156.0 The two deprecated calls were in the templates of the theme, in head.html, baseof.html, schema.html and several shortcodes, so they could not be fixed from here. v2.106.0 accepts 0.158.0 to 0.165.0, which covers both Hugo versions we build with, and no longer uses either of them. The build is free of warnings now. v3 was not taken, it is a new major version. The theme reorganised its JavaScript along the way and dropped js/process.js. Our layouts/partials/footer.html is a copy of the footer of the theme with a link to the Git repository added to the "powered by" line, and it still loaded that file, which broke the build outright: ERROR ... execute of template failed: ... --- README.md | 5 +- layouts/partials/footer.html | 108 +++++++++++++++++++---------------- themes/blowfish | 2 +- 3 files changed, 62 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 5f72bd0..d4a819a 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,9 @@ To build with *nix*: `nix build '.?submodules=1#production-content'` - Python including required packages will be available, so the `build.sh` should work without a venv - You can build the staging and production builds with `nix build .#staging-content` and `nix build .#production-content` -- Do not update the nixpkgs branch - 25.05 contains a newer hugo version that is incompatible with the theme (last - checked June 2025) +- The theme accepts a limited range of Hugo versions, declared as `[module.hugoVersion]` in + `themes/blowfish/config.toml`. Blowfish v2.106.0 wants 0.158.0 to 0.165.0, the nixpkgs branch pinned in `flake.nix` + carries 0.163.3. Keep the two in range when updating either of them, Hugo warns on every build otherwise. --- diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 12a2638..b12a880 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,69 +2,77 @@ {{/* Footer menu */}} {{ if .Site.Params.footer.showMenu | default true }} {{ if .Site.Menus.footer }} - + {{ end }} + {{ $navClass := printf "flex flex-row pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400 %s" (cond $onlyIcon "overflow-x-auto py-2" "") }} + {{ $ulClass := printf "flex list-none %s" (cond $onlyIcon "flex-row" "flex-col sm:flex-row") }} + {{ $liClass := printf "flex mb-1 text-end sm:mb-0 sm:me-7 sm:last:me-0 %s" (cond $onlyIcon "me-4" "") }} + {{ end }} {{ end }}
- {{/* Copyright */}} {{ if .Site.Params.footer.showCopyright | default true }} -

- {{- with replace .Site.Params.copyright "{ year }" now.Year }} - {{ . | markdownify }} - {{- else }} - © - {{ now.Format "2006" }} - {{ .Site.Params.Author.name | markdownify }} - {{- end }} -

+

+ {{- with replace .Site.Params.copyright "{ year }" now.Year }} + {{ . | markdownify }} + {{- else }} + © + {{ now.Format "2006" }} + {{ .Site.Params.Author.name | markdownify }} + {{- end }} +

{{ end }} {{/* Theme attribution */}} {{ if .Site.Params.footer.showThemeAttribution | default true }} -

- {{ $hugo := printf `Hugo` - }} - {{ $blowfish := printf `Blowfish` }} - {{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }} - (Git-Repo) -

+

+ {{ $hugo := printf `Hugo` + }} + {{ $blowfish := printf `Blowfish` + }} + {{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }} + (Git-Repo) +

{{ end }} -
- - {{ $jsProcess := resources.Get "js/process.js" }} - {{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }} - + {{ if not .Site.Params.disableImageZoom | default true }} + + {{ end }} {{/* Extend footer - eg. for extra scripts, etc. */}} {{ if templates.Exists "partials/extend-footer.html" }} - {{ partialCached "extend-footer.html" . }} + {{ partialCached "extend-footer.html" . }} {{ end }} diff --git a/themes/blowfish b/themes/blowfish index 0b06a64..a89d96e 160000 --- a/themes/blowfish +++ b/themes/blowfish @@ -1 +1 @@ -Subproject commit 0b06a64139beba6287e7685f4c810ad4ff772fde +Subproject commit a89d96e4dd63b0a1c1129d795ef4b56e491da1df