annotate default/blog/atom.xml @ 99:609c66552ba0

blog/item: handle new tags_http_uri variable to make tags clickable
author Goffi <goffi@goffi.org>
date Sun, 21 Jan 2018 20:25:24 +0100
parents 2dd56fd2e9c9
children 81f4ba3b121b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
97
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
1 <?xml version="1.0" encoding="utf-8"?>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
2 <feed xmlns='http://www.w3.org/2005/Atom'>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
3 {% if title is defined %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
4 <title>{{title}}</title>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
5 {% elif target_profile is defined %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
6 <title>{% trans name=target_profile%}{{name}}'s blog{% endtrans %}</title>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
7 {% else %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
8 <title>{% trans app_name=C.APP_NAME%}{{app_name}} blog{% endtrans %}</title>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
9 {% endif %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
10 <link href='{{request_uri}}' type='application/atom+xml' rel='self'/>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
11 <link href='{{http_uri}}' type='text/html' rel='alternate'/>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
12 <link href='{{xmpp_uri}}' type='application/atom+xml' rel='alternate'/>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
13 <id>{{xmpp_uri}}</id>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
14 <updated>{{updated|date_fmt('iso')}}</updated>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
15 {% for item in items %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
16 <entry>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
17 {% if item.title_xhtml %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
18 <title type='xhtml'>{{item.title_xhtml}}</title>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% else %}
98
2dd56fd2e9c9 blog/atom.xml: truncate title at 80 characters instead of 40
Goffi <goffi@goffi.org>
parents: 97
diff changeset
20 <title>{{item.title|default(item.content|truncate(80, True, '…'), True)}}</title>
97
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
21 {% endif %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
22 <link href='{{items_http_uri[item.id]}}' type='text/html' rel='alternate'/>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
23 <link href='{{item.uri}}' type='application/atom+xml' rel='alternate'/>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
24 <id>{{item.uri}}</id>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
25 <updated>{{item.updated|date_fmt('iso')}}</updated>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
26 <published>{{item.published|date_fmt('iso')}}</published>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
27 <author>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
28 <name>{{item.author}}</name>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
29 <uri>xmpp:{{item.author_jid}}</uri>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
30 </author>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
31 {% for tag in item.tags %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
32 <category term="{{tag}}"/>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
33 {% endfor %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
34 {% if item.content_xhtml %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
35 <content type='xhtml'>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
36 {{item.content_xhtml}}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
37 </content>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
38 {% else %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
39 <content type='text'>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
40 {{item.content_txt}}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
41 </content>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
42 {% endif %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
43 </entry>
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
44 {% endfor %}
e8955d01ad0c blog/atom: Atom feed template
Goffi <goffi@goffi.org>
parents:
diff changeset
45 </feed>