diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2021-03-18 16:00:23 +0100 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2021-03-18 16:00:23 +0100 |
commit | 768de298cb1babd3a9e4fcbce74d78d369210caa (patch) | |
tree | 8caa66248a098da3065056ef7ca7cf67dfa19297 /templates/web/atom.xml | |
parent | b5d445a5a11918b6d41cd0e8be9677e8963b05dc (diff) |
Add atom feed
Diffstat (limited to 'templates/web/atom.xml')
-rw-r--r-- | templates/web/atom.xml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/templates/web/atom.xml b/templates/web/atom.xml new file mode 100644 index 0000000..3948538 --- /dev/null +++ b/templates/web/atom.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + + <title>{% if q %}Results for '{{ q }}' - {% endif %}{{ settings.name }}</title> + <link href="{{ siteurl }}" /> + <link href="{{ siteurl }}/atom.xml{% if q %}?q={{ q|urlencode }}{% endif %}" rel="self" /> + <updated>{{ entries.0.data.updated }}</updated> + <id></id> + + {% for entry in entries %} + <entry> + <title>{{ entry.data.title }}</title> + <link href="{{ siteurl }}{{ url_for('entry', eid=entry.eid) }}"/> + <id>urn:uuid:{{ entry.eid }}</id> + <updated>{{ entry.data.updated }}</updated> + <summary>{{ entry.data.description }}</summary> + <content type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>{{ entry.data.description }} - {{ entry.data.url }}</p> + <p>{% for tag in entry.data.tags %} + #<a class="tag" href="{{ siteurl }}{{ url_for('search') }}?q=tags:{{tag|urlencode}}">{{ tag }}</a> + {% endfor %}</p> + </div> + </content> + </entry> + {% endfor %} + +</feed> |