]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
Changed RSS to Atom feed and improve paging
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / common / Entry / entries.xml.twig
CommitLineData
0c83fd59 1<?xml version="1.0" encoding="utf-8"?>
47e2d609
TC
2<feed xmlns="http://www.w3.org/2005/Atom">
3 <title>wallabag — {{type}} feed</title>
4 <subtitle type="html">RSS feed for {{ type }} entries</subtitle>
5 {% if entries | length > 0 %}
6 <updated>{{ (entries | first).createdAt | date('c') }}</updated> {# Indicates the last time the feed was modified in a significant way. #}
7 {% endif %}
8 <id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }}</id>
9 <link rel="alternate" type="text/html" href="{{ url(type) }}"/>
10 <link rel="self" type="application/atom+xml" href="{{ app.request.uri }}"/>
11 {% if entries.hasPreviousPage %}
12 <link rel="previous" href="{{ url }}/{{ entries.previousPage }}"/>
13 {% endif -%}
14 {% if entries.hasNextPage %}
15 <link rel="next" href="{{ url }}/{{ entries.nextPage }}"/>
16 {% endif -%}
17 <link rel="last" href="{{ url }}/{{ entries.nbPages }}"/>
18 <generator uri="http://wallabag.org" version="{{ version }}">wallabag</generator>
19 <author>
20 <name>{{ user }}</name>
21 </author>
22 <icon>{{ asset('favicon.ico') }}</icon>
23 <logo>{{ asset('bundles/wallabagcore/themes/_global/img/logo-square.png') }}</logo>
24 {% for entry in entries %}
25 <entry>
26 <title><![CDATA[{{ entry.title|e }}]]></title>
27 <link rel="alternate" type="text/html"
28 href="{{ url('view', {'id': entry.id}) }}"/>
29 <link rel="via">{{ entry.url }}</link>
30 <id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:entry:{{ entry.id }}</id>
31 <updated>{{ entry.updatedAt|date('c') }}</updated>
32 <published>{{ entry.createdAt|date('c') }}</published>
33 {% for tag in entry.tags %}
34 <category term="{{ tag.slug }}" label="{{ tag.label }}" />
0c83fd59 35 {% endfor %}
47e2d609
TC
36 {% for author in entry.publishedBy %}
37 <author>
38 <name>{{ author }}</name>
39 </author>
40 {% endfor %}
41 <content type="html" {% if entry.language %}xml:lang="{{ entry.language[:2] }}"{% endif %}>
42 <![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]>
43 </content>
44 </entry>
45 {% endfor %}
46</feed>