-
Notifications
You must be signed in to change notification settings - Fork 0
/
rss2.xml
35 lines (35 loc) · 1.25 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
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ title }}</title>
<link>{{ urlRoot | uriencode }}</link>
<atom:link href="{{ url | uriencode }}" rel="self" type="application/rss+xml"/>
{% if hub %}<atom:link href="{{ hub | uriencode }}" rel="hub"/>{% endif %}
<description>{{ desc }}</description>
<pubDate>{{ lastUpdated }}</pubDate>
<generator>https://nustjs.com/</generator>
{% for post in posts %}
<item>
<title>{{ post.title }}</title>
<link>{{ post.permalink | uriencode }}</link>
<guid>{{ post.permalink | uriencode }}</guid>
<pubDate>{{ post.dateISO }}</pubDate>
<description>
{% if post.desc %}
{{ post.desc }}
{% elif post.excerpt %}
{{ post.excerpt }}
{% elif post.body %}
{{ post.body.substring(0, 140) }}
{% endif %}
</description>
{% if show_content and post.body %}
<content:encoded><![CDATA[{{ post.body | safe }}]]></content:encoded>
{% endif %}
{% if post.comments %}<comments>{{ post.permalink | uriencode }}#comments</comments>{% endif %}
</item>
{% endfor %}
</channel>
</rss>