2022-06-17 15:51:53 +00:00
|
|
|
{{- $pages := (where site.RegularPages "Section" .Section) -}}
|
2020-11-03 23:46:20 +00:00
|
|
|
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
|
|
|
{{- if ge $limit 1 -}}
|
|
|
|
{{- $pages = $pages | first $limit -}}
|
|
|
|
{{- end -}}
|
2022-06-03 00:25:52 +00:00
|
|
|
{{- $period := "daily" -}}
|
|
|
|
{{- $mins := "1440" -}}
|
2022-06-17 15:51:53 +00:00
|
|
|
{{- $title := .Section | humanize -}}
|
2022-06-03 00:25:52 +00:00
|
|
|
{{- if eq .Section "notes" -}}
|
|
|
|
{{- $period = "hourly" -}}
|
|
|
|
{{- $mins = "60" -}}
|
|
|
|
{{- end -}}
|
2022-06-17 15:51:53 +00:00
|
|
|
{{- if .IsHome }}
|
|
|
|
{{- $period := "hourly" -}}
|
|
|
|
{{- $title = "All content" -}}
|
2022-06-18 03:53:19 +00:00
|
|
|
{{- $pages = where .Site.RegularPages "Date" "!=" (time "0001-01-01") -}}
|
2022-06-17 15:51:53 +00:00
|
|
|
{{- $mins = "60" -}}
|
|
|
|
{{ end -}}
|
2020-11-03 23:46:20 +00:00
|
|
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
2022-06-03 00:25:52 +00:00
|
|
|
<rss version="2.0"
|
|
|
|
xmlns:atom="http://www.w3.org/2005/Atom"
|
|
|
|
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
|
|
|
xml:lang="{{ .Site.LanguageCode }}">
|
2020-11-03 23:46:20 +00:00
|
|
|
<channel>
|
2022-06-17 15:51:53 +00:00
|
|
|
<title>{{ $title }} on {{ .Site.Title }}</title>
|
2020-11-03 23:46:20 +00:00
|
|
|
<link>{{ .Permalink }}</link>
|
|
|
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
2022-06-03 00:25:52 +00:00
|
|
|
<ttl>{{ $mins }}</ttl>
|
|
|
|
<sy:updatePeriod>{{ $period }}</sy:updatePeriod>
|
|
|
|
<sy:updateFrequency>1</sy:updateFrequency>
|
2020-11-03 23:46:20 +00:00
|
|
|
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
|
|
|
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
|
|
|
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
|
|
|
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
|
|
|
<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" }}
|
2021-06-14 22:31:08 +00:00
|
|
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
2020-11-03 23:46:20 +00:00
|
|
|
{{ end }}
|
2022-06-17 15:51:53 +00:00
|
|
|
{{ range $pages }}
|
2020-11-03 23:46:20 +00:00
|
|
|
<item>
|
|
|
|
<title>{{ .Title }}</title>
|
|
|
|
<link>{{ .Permalink }}</link>
|
|
|
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
|
|
|
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
|
|
|
<guid>{{ .Permalink }}</guid>
|
2022-06-18 05:09:32 +00:00
|
|
|
<description xml:base="{{ .Permalink }}">{{- .Content | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | replaceRE `<meta content="true" ?/>` "" | html -}}</description>
|
2020-11-03 23:46:20 +00:00
|
|
|
</item>
|
|
|
|
{{ end }}
|
|
|
|
</channel>
|
|
|
|
</rss>
|