diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-03-10 18:46:07 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-03-18 19:13:48 +0100 |
commit | 56e8ea2089000562533376c9e684303bdb9fdba9 (patch) | |
tree | 94097eab2682cc95417705d6368295cc3f3b4a6c | |
parent | 1c2fdb98b1c7fbd85aa086641dd47bc9bd03c8eb (diff) | |
download | Shaarli-56e8ea2089000562533376c9e684303bdb9fdba9.tar.gz Shaarli-56e8ea2089000562533376c9e684303bdb9fdba9.tar.zst Shaarli-56e8ea2089000562533376c9e684303bdb9fdba9.zip |
Create a template to handle ATOM feed
ATOM feed improvement:
* Adds a subtitle to match RSS feed behavior.
* Better syntax for categories (see http://edward.oconnor.cx/2007/02/representing-tags-in-atom ).
* Use locale to set the language
-rw-r--r-- | tpl/feed.atom.html | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tpl/feed.atom.html b/tpl/feed.atom.html new file mode 100644 index 00000000..2ebb162a --- /dev/null +++ b/tpl/feed.atom.html | |||
@@ -0,0 +1,40 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <feed xmlns="http://www.w3.org/2005/Atom"> | ||
3 | <title>{$pagetitle}</title> | ||
4 | <subtitle>Shaared links</subtitle> | ||
5 | {if="$show_dates"} | ||
6 | <updated>{$last_update}</updated> | ||
7 | {/if} | ||
8 | <link rel="self" href="{$self_link}#" /> | ||
9 | {if="!empty($pubsubhub_url)"} | ||
10 | <!-- PubSubHubbub Discovery --> | ||
11 | <link rel="hub" href="{$pubsubhub_url}#" /> | ||
12 | <!-- End Of PubSubHubbub Discovery --> | ||
13 | {/if} | ||
14 | <author> | ||
15 | <name>{$index_url}</name> | ||
16 | <uri>{$index_url}</uri> | ||
17 | </author> | ||
18 | <id>{$index_url}</id> | ||
19 | <generator>Shaarli</generator> | ||
20 | {loop="links"} | ||
21 | <entry> | ||
22 | <title>{$value.title}</title> | ||
23 | {if="$usepermalinks"} | ||
24 | <link href="{$value.guid}#" /> | ||
25 | {else} | ||
26 | <link href="{$value.url}#" /> | ||
27 | {/if} | ||
28 | <id>{$value.guid}</id> | ||
29 | {if="$show_dates"} | ||
30 | <updated>{$value.iso_date}</updated> | ||
31 | {/if} | ||
32 | <content type="html" xml:lang="{$language}"> | ||
33 | <![CDATA[{$value.description}]]> | ||
34 | </content> | ||
35 | {loop="$value.taglist"} | ||
36 | <category scheme="{$index_url}?searchtags=" term="{$value|strtolower}" label="{$value}" /> | ||
37 | {/loop} | ||
38 | </entry> | ||
39 | {/loop} | ||
40 | </feed> | ||