brainbaking/themes/brainbaking-minimal/layouts/all/list.xml

43 lines
1.9 KiB
XML

{{- $baseurl := .Site.BaseURL -}}
{{- $pages := .Site.RegularPages -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version='2.0' xmlns:content='http://purl.org/rss/1.0/modules/content/' xmlns:atom='http://www.w3.org/2005/Atom'>
<channel>
<!-- This is not the droid you're looking for! -->
<!-- Please use /index.xml to subscribe, /all/index.xml is used internally and also contains notes -->
<title>Everything from {{ .Site.Title }}</title>
<link>{{ .Permalink }}</link>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range $pages }}
<item>
<title>{{ if .Title }}{{ .Title }}{{ else }}Note on {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<comments>{{ .Site.Author.mastodonlink }}</comments>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<author>{{ with $.Site.Author.name }}{{.}}{{end}}</author>
<guid isPermaLink="true">{{ .Permalink }}</guid>
{{ if .Keywords }}
{{ range .Keywords }}
<category>{{ . }}</category>
{{ end }}
{{ else if .Params.tags }}
{{ range .Params.tags }}
<category domain="{{ $baseurl }}tags/{{ . }}">{{ . }}</category>
{{ end }}
{{ end }}
{{ $content := .Content | safeHTML }}
<description>
{{ `<![CDATA[ ` | safeHTML }}
{{ $content }}
]]>
</description>
</item>
{{ end }}
</channel>
</rss>