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: ... <resources is nil Take the footer of v2.106.0 and add the link to it again. It is the only template we override that belongs to the theme, the others are our own, and nothing else in layouts/ refers to a file the theme removed. The German strings for the 404 page still apply, the theme keeps its translations as YAML now but the keys are unchanged, and no configuration parameter we set was dropped. The site builds identically apart from the theme itself: no page is lost, none lost its content, the largest pages grow by about a third from added markup, and the churn in public/ is the renamed bundles, the dropped jQuery and differently named image derivatives. While at it, replace the note in the README that told the reader not to update nixpkgs because it would bring a Hugo the theme cannot handle. That is what just got resolved, so name the actual range instead. Assisted-by: Claude:claude-opus-5 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
d327960203
commit
c4f7605150
3 changed files with 62 additions and 53 deletions
|
|
@ -76,8 +76,9 @@ This deletes `public/` and runs `hugo` with the parameters from `.hugo-params`.
|
||||||
- After entering the shell with `nix develop`, hugo is available and `hugo serve` and `./build.sh` should work
|
- After entering the shell with `nix develop`, hugo is available and `hugo serve` and `./build.sh` should work
|
||||||
- You can build the staging and production builds with `nix build .#staging-content` and
|
- You can build the staging and production builds with `nix build .#staging-content` and
|
||||||
`nix build .#production-content`
|
`nix build .#production-content`
|
||||||
- Do not update the nixpkgs branch - 25.05 contains a newer hugo version that is incompatible with the theme (last
|
- The theme accepts a limited range of Hugo versions, declared as `[module.hugoVersion]` in
|
||||||
checked June 2025)
|
`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.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,69 +2,77 @@
|
||||||
{{/* Footer menu */}}
|
{{/* Footer menu */}}
|
||||||
{{ if .Site.Params.footer.showMenu | default true }}
|
{{ if .Site.Params.footer.showMenu | default true }}
|
||||||
{{ if .Site.Menus.footer }}
|
{{ if .Site.Menus.footer }}
|
||||||
<nav class="flex flex-row pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
|
{{ $onlyIcon := true }}
|
||||||
<ul class="flex flex-col list-none sm:flex-row">
|
{{ range .Site.Menus.footer }}
|
||||||
{{ range .Site.Menus.footer }}
|
{{ if .Name }}
|
||||||
<li class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
|
{{ $onlyIcon = false }}
|
||||||
<a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center" href="{{ .URL }}"
|
{{ break }}
|
||||||
title="{{ .Title }}">
|
|
||||||
{{ if .Pre }}
|
|
||||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
|
||||||
{{ partial "icon.html" .Pre }}
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
||||||
{{ .Name | markdownify }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
{{ end }}
|
||||||
</nav>
|
{{ $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" "") }}
|
||||||
|
<nav class="{{ $navClass }}">
|
||||||
|
<ul class="{{ $ulClass }}">
|
||||||
|
{{ range .Site.Menus.footer }}
|
||||||
|
<li class=" {{ $liClass }}">
|
||||||
|
<a
|
||||||
|
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center"
|
||||||
|
href="{{ .URL }}"
|
||||||
|
title="{{ .Title }}">
|
||||||
|
{{ if .Pre }}
|
||||||
|
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||||
|
{{ partial "icon.html" .Pre }}
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
{{ .Name | markdownify }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
|
|
||||||
{{/* Copyright */}}
|
{{/* Copyright */}}
|
||||||
{{ if .Site.Params.footer.showCopyright | default true }}
|
{{ if .Site.Params.footer.showCopyright | default true }}
|
||||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||||
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
||||||
{{ . | markdownify }}
|
{{ . | markdownify }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
©
|
©
|
||||||
{{ now.Format "2006" }}
|
{{ now.Format "2006" }}
|
||||||
{{ .Site.Params.Author.name | markdownify }}
|
{{ .Site.Params.Author.name | markdownify }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* Theme attribution */}}
|
{{/* Theme attribution */}}
|
||||||
{{ if .Site.Params.footer.showThemeAttribution | default true }}
|
{{ if .Site.Params.footer.showThemeAttribution | default true }}
|
||||||
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
||||||
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||||
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
||||||
}}
|
}}
|
||||||
{{ $blowfish := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
{{ $blowfish := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||||
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>` }}
|
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>`
|
||||||
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
|
}}
|
||||||
(<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
|
||||||
href="https://git.berlin.ccc.de/cccb-website-team/www">Git-Repo</a>)
|
(<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||||
</p>
|
href="https://git.berlin.ccc.de/cccb-website-team/www">Git-Repo</a>)
|
||||||
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
{{ if not .Site.Params.disableImageZoom | default true }}
|
||||||
{{ if not .Site.Params.disableImageZoom | default true }}
|
<script>
|
||||||
mediumZoom(document.querySelectorAll("img:not(.nozoom)"), {
|
mediumZoom(document.querySelectorAll("img:not(.nozoom)"), {
|
||||||
margin: 24,
|
margin: 24,
|
||||||
background: 'rgba(0,0,0,0.5)',
|
background: "rgba(0,0,0,0.5)",
|
||||||
scrollOffset: 0,
|
scrollOffset: 0,
|
||||||
})
|
});
|
||||||
{{ end }}
|
</script>
|
||||||
</script>
|
{{ end }}
|
||||||
{{ $jsProcess := resources.Get "js/process.js" }}
|
|
||||||
{{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }}
|
|
||||||
<script type="text/javascript" src="{{ $jsProcess.RelPermalink }}" integrity="{{ $jsProcess.Data.Integrity }}"></script>
|
|
||||||
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
||||||
{{ if templates.Exists "partials/extend-footer.html" }}
|
{{ if templates.Exists "partials/extend-footer.html" }}
|
||||||
{{ partialCached "extend-footer.html" . }}
|
{{ partialCached "extend-footer.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0b06a64139beba6287e7685f4c810ad4ff772fde
|
Subproject commit a89d96e4dd63b0a1c1129d795ef4b56e491da1df
|
||||||
Loading…
Reference in a new issue