forked from freeCodeCamp/news-theme-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrss.hbs
47 lines (45 loc) · 1.62 KB
/
rss.hbs
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
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
<title>
<![CDATA[ {{@site.title}} ]]>
</title>
<description>
<![CDATA[ {{@site.description}} ]]>
</description>
<link>{{@site.url}}</link>
<image>
<url>{{@site.url}}/favicon.png</url>
<title>{{@site.title}}</title>
<link>{{@site.url}}</link>
</image>
<lastBuildDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</lastBuildDate>
<atom:link href="{{@site.url}}" rel="self" type="application/rss+xml" />
<ttl>60</ttl>
{{#get "posts" limit="10"}}
{{#foreach posts}}
<item>
<title>
<![CDATA[ {{title}} ]]>
</title>
<description>
<![CDATA[ {{excerpt}} ]]>
</description>
<link>{{url absolute="true"}}</link>
<guid isPermaLink="false">{{id}}</guid>
<category>
<![CDATA[ {{primary_tag}} ]]>
</category>
<dc:creator>
<![CDATA[ {{primary_author.name}} ]]>
</dc:creator>
<pubDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</pubDate>
<media:content url="{{feature_image}}" medium="image" />
<content:encoded>
<![CDATA[ {{excerpt}} ]]>
</content:encoded>
</item>
{{/foreach}}
{{/get}}
</channel>
</rss>