rss.xml.j2 (1885B)
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('news/' + newspostitem['page'], 1000) }} 40 </article> 41 ]]> 42 </description> 43 </item> 44 {% endfor %} 45 </channel> 46 </rss>