From 1551503e6846ef81fadb3c574314dc9e169c7dbd Mon Sep 17 00:00:00 2001 From: jtbx Date: Sat, 23 May 2026 18:29:56 +0200 Subject: [PATCH 1/3] Theme: Update RSS template to hugo v0.134.3 Deprecation checks let the template break in some later release. Patches: - Add authors - Use content instead of summary - ~~use publish date instead of date~~ (in default template already --- themes/ccchh/layouts/_default/rss.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/themes/ccchh/layouts/_default/rss.xml b/themes/ccchh/layouts/_default/rss.xml index cc83ee8..f4a91aa 100644 --- a/themes/ccchh/layouts/_default/rss.xml +++ b/themes/ccchh/layouts/_default/rss.xml @@ -1,4 +1,3 @@ -{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} {{- $authorEmail := "" }} {{- with site.Params.author }} {{- if reflect.IsMap . }} @@ -6,14 +5,8 @@ {{- $authorEmail = . }} {{- end }} {{- end }} -{{- else }} - {{- with site.Author.email }} - {{- $authorEmail = . }} - {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} - {{- end }} {{- end }} -{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} {{- $authorName := "" }} {{- with site.Params.author }} {{- if reflect.IsMap . }} @@ -23,11 +16,6 @@ {{- else }} {{- $authorName = . }} {{- end }} -{{- else }} - {{- with site.Author.name }} - {{- $authorName = . }} - {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} - {{- end }} {{- end }} {{- $pctx := . }} @@ -48,12 +36,12 @@ {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }} - Hugo -- gohugo.io - {{ with $authorEmail }} + Hugo + {{ site.Language.LanguageCode }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} {{ . }}{{ end }}{{ if not .Date.IsZero }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" }} {{ printf "" .Permalink .MediaType | safeHTML }} {{- end }} @@ -69,7 +57,7 @@ {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} {{ .Permalink }} - {{ .Content | html }} + {{ .Content | transform.XMLEscape | safeHTML }} {{- end }} From cb3851ca81b5aa5c3affffaeab27ab2cb02d151e Mon Sep 17 00:00:00 2001 From: jtbx Date: Sat, 23 May 2026 18:40:48 +0200 Subject: [PATCH 2/3] Theme: Update for hugo v0.156 (.Site.Data) --- themes/ccchh/layouts/shortcodes/calendar-table.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/ccchh/layouts/shortcodes/calendar-table.html b/themes/ccchh/layouts/shortcodes/calendar-table.html index ecc37a5..fb17e2a 100644 --- a/themes/ccchh/layouts/shortcodes/calendar-table.html +++ b/themes/ccchh/layouts/shortcodes/calendar-table.html @@ -1,4 +1,4 @@ -{{- index .Site.Data "calendar.json" }} +{{- index hugo.Data "calendar.json" }} @@ -8,7 +8,7 @@ - {{- range first 7 (sort $.Site.Data.calendar "dtstart" ) }} + {{- range first 7 (sort hugo.Data.calendar "dtstart" ) }} {{- if eq ._type "vevent"}} {{- $start := time .dtstart }} From c4fb3883b1744c3241d1a64b623477525918f588 Mon Sep 17 00:00:00 2001 From: jtbx Date: Sat, 23 May 2026 18:42:34 +0200 Subject: [PATCH 3/3] Theme: Update for hugo v0.158 (renamed LanguageCode to Locale) --- hugo.toml | 2 +- themes/ccchh/layouts/_default/rss.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hugo.toml b/hugo.toml index 3b2548b..62fb6ad 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,5 +1,5 @@ baseURL = 'https://hamburg.ccc.de/' -languageCode = 'de-de' +locale = 'de-de' defaultContentLanguage = 'de' timeZone = 'Europe/Berlin' title = 'CCC Hansestadt Hamburg e.V.' diff --git a/themes/ccchh/layouts/_default/rss.xml b/themes/ccchh/layouts/_default/rss.xml index f4a91aa..baf0f96 100644 --- a/themes/ccchh/layouts/_default/rss.xml +++ b/themes/ccchh/layouts/_default/rss.xml @@ -37,7 +37,7 @@ {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }} Hugo - {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{ site.Language.Locale }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} {{ . }}{{ end }}{{ if not .Date.IsZero }}