|
| 1 | +<!-- Print XML declaration --> |
| 2 | +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} |
| 3 | + |
1 | 4 | {{- $authorName := "" }}
|
2 | 5 | {{- with .Site.Params.author }}
|
3 | 6 | {{- if reflect.IsMap . }}
|
|
9 | 12 | {{- end }}
|
10 | 13 | {{- end }}
|
11 | 14 |
|
12 |
| -{{- $pctx := . }} |
13 |
| -{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} |
14 |
| - |
15 | 15 | <!-- Iterate through all sections and include both sections and
|
16 | 16 | pages in the rss feed. The default rss.xml only includes
|
17 | 17 | pages. -->
|
18 | 18 | {{- $pages := slice }}
|
19 |
| -{{- $mainPages := where .Pages "Kind" "in" (slice "page" "section") }} |
| 19 | + |
| 20 | +<!-- Include the current list page (_index.md) if we're on home or a section --> |
| 21 | +{{- $pages = $pages | union (slice .) }} |
| 22 | +{{- $mainPages := where .Pages "Kind" "in" (slice "page" ) }} |
20 | 23 | {{- $pages = $pages | union $mainPages }}
|
21 | 24 |
|
| 25 | + |
| 26 | +<!-- Loop through each section and add it's _index.md and child pages --> |
22 | 27 | {{- range .Sections }}
|
23 |
| - {{- $sectionPages := where .Pages "Kind" "in" (slice "page" "section") }} |
| 28 | + {{- $sectionPages := where .Pages "Kind" "in" (slice "page") }} |
| 29 | + {{- $pages = $pages | union (slice .) }} |
24 | 30 | {{- $pages = $pages | union $sectionPages }}
|
| 31 | + <!-- Loop through any subsections adding their _index.md and child pages --> |
25 | 32 | {{- range .Sections }}
|
26 |
| - {{- $subSectionPages := where .Pages "Kind" "in" (slice "page" "section") }} |
| 33 | + {{- $subSectionPages := where .Pages "Kind" "in" (slice "page") }} |
| 34 | + {{- $pages = $pages | union (slice .) }} |
27 | 35 | {{- $pages = $pages | union $subSectionPages }}
|
28 | 36 | {{- end }}
|
29 | 37 | {{- end }}
|
30 | 38 |
|
| 39 | +<!-- order entries by PublishDate--> |
| 40 | +{{- $pages = sort $pages "PublishDate" "desc" }} |
| 41 | + |
31 | 42 | {{- $limit := .Site.Config.Services.RSS.Limit }}
|
32 | 43 | {{- if ge $limit 1 }}
|
33 | 44 | {{- $pages = $pages | first $limit }}
|
34 | 45 | {{- end }}
|
35 | 46 |
|
| 47 | +<!-- Build the actual feed using the page list--> |
36 | 48 | <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
37 | 49 | <channel>
|
38 |
| - <title>Updates from the Medley Interlisp Project</title> |
| 50 | + <title>Updates from the new Medley Interlisp Project</title> |
39 | 51 | <link>{{ .Permalink }}</link>
|
40 | 52 | <description>Updates from the Medley Interlisp Project</description>
|
41 | 53 | <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
|
0 commit comments