-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathrss.xml
54 lines (50 loc) · 2.21 KB
/
rss.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{{ $home := .Site.BaseURL | printf "%s%s" (os.Getenv "URL") }}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Istio Blog and News</title>
<description>Combined blog and news feed for the Istio service mesh.</description>
{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{ end }}
<link>{{ $home }}</link>
<image>
<title>Istio Blog and News</title>
<url>{{ $home }}/favicons/android-192x192.png</url>
<link>{{ $home }}</link>
</image>
<category>Service mesh</category>
{{ $pages := (where .Site.Pages "Section" "news").ByPublishDate.Reverse }}
{{ range $post := $pages }}
{{ with $post.PublishDate }}
{{ if not $post.Draft }}
<item>
<title>{{ $post.Title }}</title>
<description>{{ `<![CDATA[` | safeHTML }}{{ $post.Content | safeHTML }}{{ `]]>` | safeHTML }}</description>
<pubDate>{{ $post.PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<link>{{ $home }}{{ $post.RelPermalink }}</link>
<guid isPermaLink="true">{{ $home }}{{ $post.RelPermalink }}</guid>
{{ range $kw := $post.Keywords }}
<category>{{ $kw }}</category>
{{ end }}
</item>
{{ end }}
{{ end }}
{{ end }}
{{ $pages := (where .Site.Pages "Section" "blog").ByPublishDate.Reverse }}
{{ range $post := $pages }}
{{ if and (not $post.Draft) $post.IsPage }}
<item>
<title>{{ $post.Title }}</title>
<description>{{ `<![CDATA[` | safeHTML }}{{ $post.Content | safeHTML }}{{ `]]>` | safeHTML }}</description>
<pubDate>{{ $post.PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<link>{{ $home }}{{ $post.RelPermalink }}</link>
<guid isPermaLink="true">{{ $home }}{{ $post.RelPermalink }}</guid>
{{ range $kw := $post.Keywords }}
<category>{{ $kw }}</category>
{{ end }}
</item>
{{ end }}
{{ end }}
</channel>
</rss>