No plugin needed for a xml feed
[blog.git] / atom2.xml
1 ---
2 ---
3 <?xml version="1.0" encoding="utf-8"?>
4 <feed xmlns="http://www.w3.org/2005/Atom">
5 <generator uri="http://jekyllrb.com" version="{{ jekyll.version }}">Jekyll</generator>
6 <link href="{{ page.url | prepend: site.url | append: site.baseurl }}" rel="self" type="application/atom+xml" />
7 <link href="{{ site.url | append: site.baseurl }}/" rel="alternate" type="text/html" />
8 <updated>{{ site.time | date_to_xmlschema }}</updated>
9 <id>{{ site.url | append: site.baseurl | xml_escape }}/</id>
10 <title>{{ site.name | xml_escape }}</title>
11 <subtitle>{{ site.description | xml_escape }}</subtitle>
12 <author>
13 <name>{{ site.author.name | xml_escape }}</name>
14 <email>{{ site.author.email | xml_escape }}</email>
15 <uri>{{ site.author.uri | xml_escape }}</uri>
16 </author>
17 {% for post in site.posts limit: 10 %}
18 <entry>
19 <title>{{ post.title | markdownify | strip_html | strip_newlines | xml_escape }}</title>
20 <link href="{{ post.url | prepend: site.url | append: site.baseurl }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
21 <published>{{ post.date | date_to_xmlschema }}</published>
22 {% if post.last_modified_at %}<updated>{{ post.last_modified_at | date_to_xmlschema }}</updated>{% else %} <updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %}
23 <id>{{ post.id | prepend: site.url | append: site.baseurl | xml_escape }}</id>
24 <content type="html" xml:base="{{ post.url | prepend: site.url | append: site.baseurl | xml_escape }}">{{ post.content | markdownify | xml_escape }}</content>
25 {% if post.author %}
26 <author>
27 {% if post.author.name %}
28 <name>{{ post.author.name | xml_escape }}</name>
29 {% else %}
30 <name>{{ post.author | xml_escape }}</name>
31 {% endif %}
32 {% if post.author.email %}
33 <email>{{ post.author.email | xml_escape }}</email>
34 {% endif %}
35 {% if post.author.uri %}
36 <uri>{{ post.author.uri | xml_escape }}</uri>
37 {% endif %}
38 </author>
39 {% endif %}
40 {% if post.category %}
41 <category term="{{ post.category | xml_escape }}" />
42 {% endif %}
43 {% for tag in post.tags %}
44 <category term="{{ tag | xml_escape }}" />
45 {% endfor %}
46 {% if post.excerpt and post.excerpt != blank %}
47 <summary>{{ post.excerpt | markdownify | strip_html | strip_newlines | xml_escape }}</summary>
48 {% endif %}
49 </entry>
50 {% endfor %}
51 </feed>