Files
buildbroken-blog-archive/layouts/_default/index.xml
T
2026-09-10 23:34:39 +02:00

26 lines
979 B
XML

{{- $pages := where .Site.RegularPages "Section" "!=" "" }}
{{- $pages = where $pages "File.ContentBase" "!=" "impressum" }}
{{- $limit := .Site.Config.Services.RSS.Limit }}
{{- if ge $limit 1 }}
{{- $pages = $pages | first $limit }}
{{- end }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ .Site.Title }}</title>
<link>{{ .Site.BaseURL }}</link>
<description>{{ with .Site.Params.description }}{{ . }}{{ end }}</description>
<generator>Hugo -- gohugo.io</generator>
{{- with .Language.Locale }}<language>{{ . }}</language>{{ end }}
{{- range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</pubDate>
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description>
{{- with .Params.author }}<author>{{ . }}</author>{{ end }}
</item>
{{- end }}
</channel>
</rss>