-
Notifications
You must be signed in to change notification settings - Fork 1
/
atom.xml
44 lines (44 loc) · 1.81 KB
/
atom.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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ config.title | e }}</title>
{% if config.subtitle %}<subtitle>{{ config.subtitle | e }}</subtitle>{% endif %}
<link href="{{ feed_url | uriencode }}" rel="self"/>
{% if config.feed.hub %}<link href="{{ config.feed.hub | uriencode }}" rel="hub"/>{% endif %}
<link href="{{ url | uriencode }}"/>
<updated>{{ posts.first().updated.toISOString() }}</updated>
<id>{{ category_url }}</id>
{% if config.author %}
<author>
<name>{{ config.author | e }}</name>
{% if config.email %}<email>{{ config.email | e }}</email>{% endif %}
</author>
{% endif %}
<generator uri="http://hexo.io/">Hexo</generator>
{% for post in posts.toArray() %}
<entry>
<title>{{ post.title | e }}</title>
<link href="{{ (url + post.path) | uriencode }}"/>
<id>{{ url + post.path }}</id>
<published>{{ post.date.toISOString() }}</published>
<updated>{{ post.updated.toISOString() }}</updated>
{% if config.feed.content %}
<content type="html">{{ post.content | e }}</content>
{% endif %}
<summary type="html">
{% if post.description %}
{{ post.description | e }}
{% elif post.excerpt %}
{{ post.excerpt | e }}
{% elif post.content %}
{{ post.content.substring(0, 140) | e }}
{% endif %}
</summary>
{% for category in post.categories.toArray() %}
<category term="{{ category.name }}" scheme="{{ (url + category.path) | uriencode }}"/>
{% endfor %}
{% for tag in post.tags.toArray() %}
<category term="{{ tag.name }}" scheme="{{ (url + tag.path) | uriencode }}"/>
{% endfor %}
</entry>
{% endfor %}
</feed>