forked from hexojs/hexo-generator-feed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rss2.xml
73 lines (68 loc) · 3.34 KB
/
rss2.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"
>
<channel>
<title>{{ config.podcast.cnp.title | e }}</title>
<link>{{ config.podcast.cnp.url | uriencode }}</link>
<itunes:new-feed-url>{{ config.podcast.cnp.feed | uriencode }}</itunes:new-feed-url>
<atom:link href="{{ feed_url | uriencode }}" rel="self" type="application/rss+xml"/>
<description>{{ config.podcast.cnp.description | e }}</description>
<itunes:summary>{{ config.podcast.cnp.description | e }}</itunes:summary>
<itunes:author>{{ config.podcast.cnp.author | e }}</itunes:author>
<itunes:explicit>no</itunes:explicit>
<itunes:image href="{{ config.podcast.cnp.cover | uriencode }}" />
<image>
<title>{{ config.podcast.cnp.title | e }}</title>
<url>{{ config.podcast.cnp.cover | uriencode }}</url>
<link>{{ config.podcast.cnp.url | uriencode }}</link>
</image>
<itunes:category text="Science & Medicine">
<itunes:category text="Social Sciences" />
</itunes:category>
<itunes:category text="Education">
<itunes:category text="Higher Education" />
</itunes:category>
<itunes:category text="Society & Culture">
<itunes:category text="Philosophy" />
</itunes:category>
<rawvoice:rating>TV-G</rawvoice:rating>
<itunes:owner>
<itunes:name>{{ config.podcast.cnp.author | e }}</itunes:name>
<itunes:email>{{ config.podcast.cnp.email | uriencode }}</itunes:email>
</itunes:owner>
<managingEditor>{{ config.podcast.cnp.email | uriencode }} ({{ config.podcast.cnp.author | e }})</managingEditor>
<copyright>{{ config.podcast.cnp.copyright | e }}</copyright>
<itunes:subtitle>{{ config.podcast.cnp.subtitle | e }}</itunes:subtitle>
<pubDate>{{ posts.first().updated.toDate().toUTCString() }}</pubDate>
<language>zh-CN</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
{% for post in posts.toArray() %}
<item>
<title>{{ (post.categories.data[0].name + " " + post.title) | e }}</title>
<itunes:subtitle>{{ post.subtitle | e }}</itunes:subtitle>
<itunes:author>{{ post.author | e }}</itunes:author>
<link>{{ (url + post.path) | uriencode }}</link>
<guid>{{ (url + post.path) | uriencode }}</guid>
<pubDate>{{ post.date.toDate().toUTCString() }}</pubDate>
<description><![CDATA[{{ post.content | safe }}]]></description>
<itunes:summary><![CDATA[{{ post.content | safe }}]]></itunes:summary>
{% if config.feed.content %}
<content:encoded><![CDATA[{{ post.content | safe }}]]></content:encoded>
{% endif %}
<enclosure url="{{ post.audio | uriencode }}" type="audio/mpeg" />
<itunes:image href="{{ post.cover | uriencode }}" />
<itunes:explicit>{{ post.explicit | e }}</itunes:explicit>
</item>
{% endfor %}
</channel>
</rss>