2021-03-19 20:43:23 +01:00
|
|
|
{{- $allowedRssSections := (slice "post" "notes") -}}
|
2020-11-24 21:29:44 +01:00
|
|
|
{{- $baseurl := .Site.BaseURL -}}
|
|
|
|
{{- $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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
2021-05-05 09:12:24 +02:00
|
|
|
{{- printf "<?xml-stylesheet href=\"/pretty-feed-v3.xsl\" type=\"text/xsl\"?>" | safeHTML }}
|
|
|
|
<rss version='2.0' xmlns:content='http://purl.org/rss/1.0/modules/content/' xmlns:atom='http://www.w3.org/2005/Atom'>
|
2020-11-24 21:29:44 +01:00
|
|
|
<channel>
|
|
|
|
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
|
|
|
<link>{{ .Permalink }}</link>
|
|
|
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
|
|
|
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
2021-02-21 13:44:57 +01:00
|
|
|
<language>{{.}}</language>{{end}}
|
|
|
|
<managingEditor>{{ with $.Site.Author.name }}{{.}}{{end}}</managingEditor>
|
|
|
|
<webMaster>{{ with $.Site.Author.name }}{{.}}{{end}}</webMaster>{{ with .Site.Copyright }}
|
2020-11-24 21:29:44 +01:00
|
|
|
<copyright>{{.}}</copyright>{{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 }}
|
2021-05-20 15:23:30 +02:00
|
|
|
{{ if and (in $allowedRssSections .Section) (not (isset .Params "type")) (or (not (isset .Params "context")) (eq .Params.context "")) }}
|
2020-11-24 21:29:44 +01:00
|
|
|
<item>
|
2021-05-20 09:25:56 +02:00
|
|
|
<title>{{ if eq .Section "post" }} 📰 {{ else if eq .Section "notes" }} 💭 {{ end }}{{ .Title }}</title>
|
2020-11-24 21:29:44 +01:00
|
|
|
<link>{{ .Permalink }}</link>
|
2021-03-18 11:23:50 +01:00
|
|
|
<comments>{{ .Site.Author.mastodonlink }}</comments>
|
2020-11-24 21:29:44 +01:00
|
|
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
2021-02-21 13:44:57 +01:00
|
|
|
<author>{{ with $.Site.Author.name }}{{.}}{{end}}</author>
|
|
|
|
<guid isPermaLink="true">{{ .Permalink }}</guid>
|
2020-11-24 21:29:44 +01:00
|
|
|
{{ if .Keywords }}
|
|
|
|
{{ range .Keywords }}
|
|
|
|
<category>{{ . }}</category>
|
|
|
|
{{ end }}
|
|
|
|
{{ else if .Params.tags }}
|
|
|
|
{{ range .Params.tags }}
|
2021-02-21 13:44:57 +01:00
|
|
|
<category domain="{{ $baseurl }}tags/{{ . }}">{{ . }}</category>
|
2020-11-24 21:29:44 +01:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2021-01-05 15:30:06 +01:00
|
|
|
|
2021-03-12 19:35:05 +01:00
|
|
|
{{ $content := .Content | safeHTML }}
|
2020-11-24 21:29:44 +01:00
|
|
|
<description>
|
|
|
|
{{ `<![CDATA[ ` | safeHTML }}
|
|
|
|
{{ if .Params.bigimg }}
|
2021-01-05 15:30:06 +01:00
|
|
|
<p>
|
|
|
|
<img align="left" hspace="5" src="{{ $baseurl }}bigimg/{{ .Params.bigimg }}"/>
|
|
|
|
</p>
|
2020-11-24 21:29:44 +01:00
|
|
|
{{ end }}
|
|
|
|
|
2021-01-05 16:26:57 +01:00
|
|
|
{{ $content }}
|
2021-01-05 17:03:59 +01:00
|
|
|
|
|
|
|
<p>
|
2021-04-05 12:10:16 +02:00
|
|
|
By <a href="/about">{{ .Site.Author.name }}</a> on {{ .Date.Format "2 January 2006" }}.
|
2021-01-05 17:03:59 +01:00
|
|
|
</p>
|
2020-11-24 21:29:44 +01:00
|
|
|
]]>
|
|
|
|
</description>
|
|
|
|
</item>
|
|
|
|
{{ end }}
|
2021-03-19 20:43:23 +01:00
|
|
|
{{ end }}
|
2020-11-24 21:29:44 +01:00
|
|
|
</channel>
|
|
|
|
</rss>
|