aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-05-07 18:16:39 +0200
committerFlorian Dold <florian@dold.me>2021-05-07 18:16:39 +0200
commita52f6f3d0966a9930a2c12a6e0db307704548fb2 (patch)
tree61f3b9e1081a7fcfc773bcfa6013a17792c82cd3
parent9745ecfa408d35593bcda4921db5555804fbebcb (diff)
downloadwww-a52f6f3d0966a9930a2c12a6e0db307704548fb2.tar.gz
www-a52f6f3d0966a9930a2c12a6e0db307704548fb2.zip
missing file
-rw-r--r--template/rss.xml.j246
1 files changed, 46 insertions, 0 deletions
diff --git a/template/rss.xml.j2 b/template/rss.xml.j2
new file mode 100644
index 00000000..3ffe6d38
--- /dev/null
+++ b/template/rss.xml.j2
@@ -0,0 +1,46 @@
1{#
2# Copyright (C) 2019, 2020 GNUnet e.V.
3#
4# This code is derived from code contributed to GNUnet eV
5# by nikita <nikita@n0.is>.
6#
7# Permission to use, copy, modify, and/or distribute this software for
8# any purpose with or without fee is hereby granted.
9#
10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17# PERFORMANCE OF THIS SOFTWARE.
18#
19# SPDX-License-Identifier: 0BSD
20#}
21<?xml version="1.0" encoding="UTF-8"?>
22<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
23 <channel>
24 <atom:link href="{{ siteconf['baseurl'] }}{{ lang }}/rss.xml" rel="self" type="application/rss+xml" />
25 <title>{{ siteconf['rsstitle'] }}</title>
26 <language>{{ lang }}</language>
27 <description>{{ siteconf['rssdescr']|e }}</description>
28 <link>{{ siteconf['baseurl'] }}/</link>
29 <lastBuildDate>{{ now }}</lastBuildDate>
30 {% for newspostitem in newsposts %}
31 <item>
32 <guid>{{ siteconf['baseurl'] }}{{ lang }}{{ siteconf['newsloc'] }}{{ newspostitem['page'] }}</guid>
33 <link>{{ siteconf['baseurl'] }}{{ lang }}{{ siteconf['newsloc'] }}{{ newspostitem['page'] }}</link>
34 <pubDate>{{ conv_date_rfc822(newspostitem["date"]) }}</pubDate>
35 <title>{{ newspostitem['title']|e }}</title>
36 <description>
37 <![CDATA[
38 <article>
39 {{ get_abstract(newspostitem['page'], 1000) }}
40 </article>
41 ]]>
42 </description>
43 </item>
44 {% endfor %}
45 </channel>
46</rss>