Add RSS pagination

Following https://tools.ietf.org/html/rfc5005#page-4
This commit is contained in:
Jeremy Benoist
2016-11-19 14:53:28 +01:00
parent 3c969d3990
commit 8670250a26
3 changed files with 91 additions and 12 deletions

View File

@ -2,7 +2,15 @@
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>wallabag — {{type}} feed</title>
<link>{{ url('unread') }}</link>
<link>{{ url(type) }}</link>
<link rel="self" href="{{ app.request.uri }}"/>
{% if entries.hasPreviousPage -%}
<link rel="previous" href="{{ url }}?page={{ entries.previousPage }}"/>
{% endif -%}
{% if entries.hasNextPage -%}
<link rel="next" href="{{ url }}?page={{ entries.nextPage }}"/>
{% endif -%}
<link rel="last" href="{{ url }}?page={{ entries.nbPages }}"/>
<pubDate>{{ "now"|date('D, d M Y H:i:s') }}</pubDate>
<generator>wallabag</generator>
<description>wallabag {{type}} elements</description>