-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml.twig.example
39 lines (36 loc) · 1.28 KB
/
atom.xml.twig.example
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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Sourdust Feed Aggregator</title>
<subtitle>An aggregation of feeds.</subtitle>
<link href="http://example.org/feed/" rel="self" />
<link href="http://example.org/" />
<id>http://example.org/</id>
<updated>{{date_ISO8601}}</updated>
{% for item in simplepie.get_items %}
<entry>
<title type="html">
{% if item.get_title %}
{{item.get_title}}
{% else %}
Untitled
{% endif %}
</title>
<link href="{{item.get_permalink}}" />
<updated>{{item.get_date('c')}}</updated>
<id>{{item.get_id}}</id>
<author>
{% if item.get_author.get_name %}
<name>{{item.get_author.get_name|raw}}</name>
{% else %}
Anon
{% endif %}
{% if item.get_author.get_email %}
<email>{{item.get_author.get_email|raw}}</email>
{% endif %}
</author>
<content type="html">
{{item.get_content}}
</content>
</entry>
{% endfor %}
</feed>