From: Kai Moritz Date: Sat, 20 Dec 2025 22:28:42 +0000 (+0100) Subject: WIP X-Git-Tag: frontend--hugo--rebase--2025-12-21--18-30 X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=e6dbeb34b393bb13cf543ea556a81ad400805524;p=website WIP --- diff --git a/hugo.yaml b/hugo.yaml index aacde1e6..bdd51f41 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -1,5 +1,5 @@ baseURL: https://example.org/ -copyright: mo +copyright: Kai Moritz languageCode: en-US mainSections: - blog @@ -11,4 +11,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/rss.xml b/layouts/rss.xml index 06c639bd..70b73407 100644 --- a/layouts/rss.xml +++ b/layouts/rss.xml @@ -1,44 +1,27 @@ -{{- $pctx := . }} -{{- if .IsHome }}{{ $pctx = site }}{{ end }} -{{- $pages := slice }} -{{- if or $.IsHome $.IsSection }} -{{- $pages = $pctx.RegularPages }} -{{- else }} -{{- $pages = $pctx.Pages }} -{{- end }} -{{- $limit := site.Config.Services.RSS.Limit }} -{{- if ge $limit 1 }} -{{- $pages = $pages | first $limit }} -{{- end }} {{- printf "" | safeHTML }} {{ site.Title }} {{ .Permalink }} - {{ site.Description }} + {{ site.Params.description }} Hugo -- {{ hugo.Version }} {{ site.Language.LanguageCode }} - {{params.author.email}} ({{params.author.name}}) - {{params.author.email}} ({{params.author.name}}) - {{ . | markdownify | plainify | strings.TrimPrefix "© " }} - {{ (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 }} - {{- range $pages }} - {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} + {{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 }} - {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{site.Params.author.email}} ({{site.Params.author.name}}) {{ .Permalink }} - {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} - {{- if and site.Params.ShowFullTextinRSS .Content }} - {{ (printf "" .Content) | safeHTML }} - {{- end }} + {{ with .Description }} + {{ . }} + {{ end -}} {{- end }} - {{- end }}