-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathfeed.xml
More file actions
58 lines (58 loc) · 2.12 KB
/
feed.xml
File metadata and controls
58 lines (58 loc) · 2.12 KB
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
---
layout: none
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:media="http://search.yahoo.com/mrss/">
<title>{{ site.title | xml_escape }}</title>
<link href="{{ site.feed.path | absolute_url }}" rel="self"/>
<link href="{{ "/" | absolute_url }}"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ "" | absolute_url }}/</id>
<author>
<name>{{ site.author.default_name | default: site.title | xml_escape }}</name>
</author>
{% for post in site.posts limit: site.feed.posts_limit %}
<entry>
<title>{{ post.title | xml_escape }}</title>
<link href="{{ post.url | absolute_url }}"/>
<id>{{ post.url | absolute_url }}</id>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<published>{{ post.date | date_to_xmlschema }}</published>
{% if post.authors %}
{% for author_key in post.authors %}
{% assign author = site.data.authors[author_key] %}
{% if author %}
<author>
<name>{{ author.visible_name | xml_escape }}</name>
{% if author.url %}
<uri>{{ author.url | xml_escape }}</uri>
{% endif %}
</author>
{% endif %}
{% endfor %}
{% elsif post.author %}
<author>
<name>
{% assign author = site.data.authors[post.author] %}
{% if author and author.visible_name %}
{{ author.visible_name | xml_escape }}
{% else %}
{{ post.author | xml_escape }}
{% endif %}
</name>
</author>
{% else %}
<author>
<name>{{ site.author.default_name | default: site.title | xml_escape }}</name>
</author>
{% endif %}
<summary type="html">{{ post.excerpt | xml_escape }}</summary>
<content type="html">{{ post.content | xml_escape }}</content>
{% if post.image %}
<media:thumbnail url="{{ post.image.url | absolute_url }}" />
<media:content url="{{ post.image.url | absolute_url }}" medium="image" />
{% endif %}
</entry>
{% endfor %}
</feed>