From 5c1b60fa3af7a761c83f06e4fd3e892bc499bf83 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Fri, 16 Oct 2026 15:06:48 +0200 Subject: [PATCH] Upgrade to Hugo 0.16x and zen theme v7.1.0 - Bump themes/zen from v5.7.0 to v7.1.0 (vanilla CSS, no libsass). - Move layouts to Hugo's new template structure (_default -> root, index.html -> home.html, shortcodes -> _shortcodes). - Replace deprecated language API in templates (Locale, Direction, Name) and sync base templates and mobile menu with theme v7. - Config: languageName/languageCode -> label/locale; move copyright to the top-level key the v7 footer reads. - Port _custom.scss to assets/css/_custom.css and map page/body backgrounds to v7's --color-body-bg/--color-page-bg. - CI: build with hugomods/hugo:0.165.0. --- .forgejo/workflows/deploy.yaml | 2 +- assets/{sass/_custom.scss => css/_custom.css} | 8 ++++++-- hugo.yaml | 13 ++++++------- layouts/_partials/mobilemenu.html | 2 +- layouts/{shortcodes => _shortcodes}/lang.html | 6 +++--- layouts/{shortcodes => _shortcodes}/map-39c3.html | 0 layouts/{_default => }/baseof.html | 11 ++--------- layouts/{_default => }/home-baseof.html | 11 ++--------- layouts/{index.html => home.html} | 0 layouts/{_default => }/list-bytitle.html | 0 layouts/{_default => }/summary.html | 0 themes/zen | 2 +- 12 files changed, 22 insertions(+), 33 deletions(-) rename assets/{sass/_custom.scss => css/_custom.css} (82%) rename layouts/{shortcodes => _shortcodes}/lang.html (81%) rename layouts/{shortcodes => _shortcodes}/map-39c3.html (100%) rename layouts/{_default => }/baseof.html (74%) rename layouts/{_default => }/home-baseof.html (73%) rename layouts/{index.html => home.html} (100%) rename layouts/{_default => }/list-bytitle.html (100%) rename layouts/{_default => }/summary.html (100%) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index f728bde..db47f8e 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: build: runs-on: docker container: - image: docker.io/hugomods/hugo:0.150.1 + image: docker.io/hugomods/hugo:0.165.0 steps: - name: Pipeline info run: | diff --git a/assets/sass/_custom.scss b/assets/css/_custom.css similarity index 82% rename from assets/sass/_custom.scss rename to assets/css/_custom.css index 82c3220..0ccee24 100644 --- a/assets/sass/_custom.scss +++ b/assets/css/_custom.css @@ -18,11 +18,15 @@ th, td { margin-left: 2em; } +/* Zen v7 paints body with --color-body-bg and .page with --color-page-bg. */ +:root { + --color-body-bg: light-dark(var(--color-grey-100), #141414); + --color-page-bg: light-dark(var(--color-white), #242424); +} + @media (prefers-color-scheme: dark) { :root { - --color-backdrop: #141414; --color-headings: #faf5f5; - --color-body-bg: #242424; --color-header-bg: #242424; --color-text: #faf5f5; --color-link: #66f2ff; diff --git a/hugo.yaml b/hugo.yaml index 3515e66..3f5235f 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -1,16 +1,15 @@ baseURL: 'https://hackertours.hamburg.ccc.de/' defaultContentLanguage: de defaultContentLanguageInSubdir: true -#languageCode: 'de-de' title: 'Hamburg Hackertours' theme: "zen" +copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) ist nur der Vermittler der Touren. Für das Angebot und die Durchführung der Touren sind die jeweiligen Veranstalter verantwortlich." ignoreLogs: - 'warning-frontmatter-params-overrides' #https://themes.gohugo.io/themes/hugo-theme-zen/#configuration params: contact: "ticket@hackertours.hamburg.ccc.de" - copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) ist nur der Vermittler der Touren. Für das Angebot und die Durchführung der Touren sind die jeweiligen Veranstalter verantwortlich." dateFormat: "02.01.2006 15:04" description: "Hamburg Hackertours" footer: "[Impressum & Datenschutz](https://hamburg.ccc.de/imprint/) – [Ticket Shop](https://tickets.hamburg.ccc.de/hackertours/39c3ht/)" @@ -28,19 +27,19 @@ params: languages: en: weight: 1 - languageName: "English" - languageCode: "en" + label: "English" + locale: "en" contentDir: content/en pagination: pagerSize: 25 params: - copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) only acts as an agent for the tours. The respective tour operators are responsible for the offer and running of the tours." footer: "[Imprint & Data Protection](https://hamburg.ccc.de/imprint/) – [Ticket Shop](https://tickets.hamburg.ccc.de/hackertours/39c3ht/)" title: "Hamburg Hackertours" + copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) only acts as an agent for the tours. The respective tour operators are responsible for the offer and running of the tours." de: weight: 2 - languageName: "Deutsch" - languageCode: "de" + label: "Deutsch" + locale: "de" contentDir: content/de pagination: pagerSize: 25 diff --git a/layouts/_partials/mobilemenu.html b/layouts/_partials/mobilemenu.html index 844b94a..af2cf49 100644 --- a/layouts/_partials/mobilemenu.html +++ b/layouts/_partials/mobilemenu.html @@ -8,7 +8,7 @@ -