From: Kai Moritz Date: Sat, 20 Dec 2025 21:34:55 +0000 (+0100) Subject: `section`-Template für den Blog überarbeitet und RSS-Ausgabe hinzugefügt X-Git-Tag: frontend--hugo--todo~4 X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=66ab4ebccab88f51303bc2a1079a51e7964fcf98;p=website `section`-Template für den Blog überarbeitet und RSS-Ausgabe hinzugefügt --- diff --git a/hugo.yaml b/hugo.yaml index 3add8ce0..51f32cde 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -1,4 +1,5 @@ baseURL: https://example.org/ +copyright: Kai Moritz languageCode: en-US mainSections: - blog @@ -8,4 +9,8 @@ module: hugoVersion: extended: false min: 0.152.0 +params: + author: + email: kai@juplo.de + name: Kai Moritz title: Thymeleaf-Theme for Thymeroot diff --git a/layouts/blog/section.html b/layouts/blog/section.html index acac1bb4..4dc240e5 100644 --- a/layouts/blog/section.html +++ b/layouts/blog/section.html @@ -1,45 +1,21 @@ {{- define "title" }}

- {{ .Title }} - {{- if (.Param "ShowRssButtonInSectionTermList") }} - {{- $rss := (.OutputFormats.Get "rss") }} - {{- if (eq .Kind `page`) }} - {{- $rss = (.Parent.OutputFormats.Get "rss") }} - {{- end }} - {{- with $rss }} + {{- with .OutputFormats.Get "rss" }} - + Archive of all Blog-Articles - {{- end }} - {{- end }}

- {{- if .Description }} -
- {{ .Description }} -
{{- end }} {{- end }}{{/* end title */}} {{- define "main" }} -{{- range .Pages.GroupByPublishDate "2006" }} -{{- if ne .Key "0001" }} -
- {{- $year := replace .Key "0001" "" }} -

- - {{- $year -}} - -

- {{- range .Pages.GroupByDate "January" }} -
-
- {{- range .Pages }} - {{- if eq .Kind "page" }} +{{- range .RegularPagesRecursive }}

{{- .Title | markdownify }} @@ -56,12 +32,5 @@ {{- partial "post_meta.html" . -}}

- {{- end }} - {{- end }} -
-
- {{- end }} - -{{- end }} {{- end }} {{- end }}{{/* end main */}} diff --git a/layouts/rss.xml b/layouts/rss.xml new file mode 100644 index 00000000..70b73407 --- /dev/null +++ b/layouts/rss.xml @@ -0,0 +1,27 @@ +{{- printf "" | safeHTML }} + + + {{ site.Title }} + {{ .Permalink }} + {{ site.Params.description }} + Hugo -- {{ hugo.Version }} + {{ site.Language.LanguageCode }} + {{site.Params.author.email}} ({{site.Params.author.name}}) + {{site.Params.author.email}} ({{site.Params.author.name}}) + {{ site.Copyright | markdownify | plainify | strings.TrimPrefix "© " }} + {{ site.Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + + {{- range .RegularPagesRecursive }} + + {{ .Title }} + {{ .Permalink }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{site.Params.author.email}} ({{site.Params.author.name}}) + {{ .Permalink }} + {{ with .Description }} + {{ . }} + {{ end -}} + + {{- end }} + +