|
| 1 | +{{- $authorName := "" }} |
| 2 | +{{- with .Site.Params.author }} |
| 3 | + {{- if reflect.IsMap . }} |
| 4 | + {{- with .name }} |
| 5 | + {{- $authorName = . }} |
| 6 | + {{- end }} |
| 7 | + {{- else }} |
| 8 | + {{- $authorName = . }} |
| 9 | + {{- end }} |
| 10 | +{{- end }} |
| 11 | + |
| 12 | +{{- $pctx := . }} |
| 13 | +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} |
| 14 | + |
| 15 | +<!-- Iterate through all sections and include both sections and |
| 16 | + pages in the rss feed. The default rss.xml only includes |
| 17 | + pages. --> |
| 18 | +{{- $pages := slice }} |
| 19 | +{{- $mainPages := where .Pages "Kind" "in" (slice "page" "section") }} |
| 20 | +{{- $pages = $pages | union $mainPages }} |
| 21 | + |
| 22 | +{{- range .Sections }} |
| 23 | + {{- $sectionPages := where .Pages "Kind" "in" (slice "page" "section") }} |
| 24 | + {{- $pages = $pages | union $sectionPages }} |
| 25 | + {{- range .Sections }} |
| 26 | + {{- $subSectionPages := where .Pages "Kind" "in" (slice "page" "section") }} |
| 27 | + {{- $pages = $pages | union $subSectionPages }} |
| 28 | + {{- end }} |
| 29 | +{{- end }} |
| 30 | + |
| 31 | +{{- $limit := .Site.Config.Services.RSS.Limit }} |
| 32 | +{{- if ge $limit 1 }} |
| 33 | + {{- $pages = $pages | first $limit }} |
| 34 | +{{- end }} |
| 35 | + |
| 36 | +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
| 37 | + <channel> |
| 38 | + <title>Updates from the Medley Interlisp Project</title> |
| 39 | + <link>{{ .Permalink }}</link> |
| 40 | + <description>Updates from the Medley Interlisp Project</description> |
| 41 | + <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} |
| 42 | + <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} |
| 43 | + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} |
| 44 | + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} |
| 45 | + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} |
| 46 | + <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} |
| 47 | + {{ with .OutputFormats.Get "RSS" }} |
| 48 | + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} |
| 49 | + {{ end }} |
| 50 | + {{ range $pages }} |
| 51 | + <item> |
| 52 | + <title>{{ .Title }}</title> |
| 53 | + <link>{{ .Permalink }}</link> |
| 54 | + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> |
| 55 | + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} |
| 56 | + <guid>{{ .Permalink }}</guid> |
| 57 | + <description>{{ .Summary | html }}</description> |
| 58 | + {{ range .Params.tags }} |
| 59 | + <category>{{ . }}</category> |
| 60 | + {{ end }} |
| 61 | + </item> |
| 62 | + {{ end }} |
| 63 | + </channel> |
| 64 | +</rss> |
0 commit comments