aboutsummaryrefslogtreecommitdiff
path: root/templates/web
diff options
context:
space:
mode:
authorfabrixxm <fabrixxm@kirgroup.net>2022-01-26 11:56:10 +0100
committerfabrixxm <fabrixxm@kirgroup.net>2022-01-26 11:56:10 +0100
commite9344f987608792b46d1ec0d1fd055e0baa26e2f (patch)
tree277d2338fa6f101d7b07fdafbf42d45267684bd3 /templates/web
parent71df0c3bb450409d9d5b448c933c78a06292c45c (diff)
Fix atom feed
- add generator, author, icon, tags as categories - fix dates, summary and entry id urn
Diffstat (limited to 'templates/web')
-rw-r--r--templates/web/atom.xml26
1 files changed, 19 insertions, 7 deletions
diff --git a/templates/web/atom.xml b/templates/web/atom.xml
index 3948538..c03bfe3 100644
--- a/templates/web/atom.xml
+++ b/templates/web/atom.xml
@@ -1,27 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
-
+ <generator uri="https://git.sr.ht/~fabrixxm/lesanaweb">Lesana Web</generator>
<title>{% if q %}Results for '{{ q }}' - {% endif %}{{ settings.name }}</title>
+ <author>
+ <name>GL-Como</name>
+ <uri>https://gl-como.it</uri>
+ </author>
+ <icon>{{ siteurl }}{{ url_for('static', filename='linkopedia_rgb.svg') }}</icon>
<link href="{{ siteurl }}" />
<link href="{{ siteurl }}/atom.xml{% if q %}?q={{ q|urlencode }}{% endif %}" rel="self" />
- <updated>{{ entries.0.data.updated }}</updated>
- <id></id>
+ <updated>{{ entries.0.data.updated.strftime("%Y-%m-%dT%H:%M:%SZ") }}</updated>
+ <id>{{ siteurl }}/atom.xml{% if q %}?q={{ q|urlencode }}{% endif %}</id>
{% for entry in entries %}
<entry>
<title>{{ entry.data.title }}</title>
+ <author>
+ <name>GL-Como</name>
+ <uri>https://gl-como.it</uri>
+ </author>
<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>
+ <id>urn:lesana:{{ entry.eid }}</id>
+ <updated>{{ entry.data.updated.strftime("%Y-%m-%dT%H:%M:%SZ") }}</updated>
+ <summary>{% if entry.data.description %}{{ entry.data.description }}{% else %}{{ entry.data.url }}{% endif %}</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>
+ <a class="tag" href="{{ siteurl }}{{ url_for('search') }}?q=tags:{{tag|urlencode}}">#{{ tag }}</a>
{% endfor %}</p>
</div>
</content>
+ {% for tag in entry.data.tags %}
+ <category term="{{tag}}"/>
+ {% endfor %}
</entry>
{% endfor %}