From: Kai Moritz Date: Sat, 20 Dec 2025 21:34:55 +0000 (+0100) Subject: WIP X-Git-Tag: frontend--hugo--rebase--2025-12-21--18-30~2 X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=dfe5b88d5297d006d5d4c6e4a529d419ab111977;p=website WIP --- diff --git a/hugo.yaml b/hugo.yaml index 4d9d6b77..aacde1e6 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -1,4 +1,5 @@ baseURL: https://example.org/ +copyright: mo languageCode: en-US mainSections: - blog 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..06c639bd --- /dev/null +++ b/layouts/rss.xml @@ -0,0 +1,44 @@ +{{- $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 }} + 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`) }} + + {{ .Title }} + {{ .Permalink }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{ .Permalink }} + {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} + {{- if and site.Params.ShowFullTextinRSS .Content }} + {{ (printf "" .Content) | safeHTML }} + {{- end }} + + {{- end }} + {{- end }} + +