]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/templates/blog/feed.xml
RSS: Change feed to Atom format
[ipfire.org.git] / src / templates / blog / feed.xml
index 1796d3d0aa4cede09297ee8e680fc699085dd1cb..98fe72e635f0256ccd8cd75d9a8227ce9f136e8e 100644 (file)
@@ -2,43 +2,32 @@
 
 {% import ipfire.accounts as accounts %}
 
-<rss version="2.0"
-               xmlns:content="http://purl.org/rss/1.0/modules/content/"
-               xmlns:atom="http://www.w3.org/2005/Atom"
-               xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
-       <channel>
-               <title>IPFire Blog</title>
-               <atom:link href="https://blog.ipfire.org/feed.xml" rel="self" type="application/rss+xml" />
-               <link>https://blog.ipfire.org</link>
-               <description>The official blog of the IPFire Project</description>
-               <lastBuildDate>{{ now }}</lastBuildDate>
-               <language>en-GB</language>
-               <sy:updatePeriod>hourly</sy:updatePeriod>
-               <sy:updateFrequency>1</sy:updateFrequency>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
+       <id>https://blog.ipfire.org/feed.xml</id>
 
-               <image>
-                       <url>https://www.ipfire.org{{ static_url("img/tux/ipfire_tux_32x32.png") }}</url>
-                       <title>IPFire Blog</title>
-                       <link>https://blog.ipfire.org</link>
-                       <width>32</width>
-                       <height>32</height>
-               </image>
+       <link href="https://blog.ipfire.org/feed.xml" rel="self" type="application/atom+xml" />
+       <link href="https://blog.ipfire.org" rel="alternate" type="text/html"/>
+       <link rel="payment" title="Donate!" href="https://www.ipfire.org/donate" type="text/html" />
 
-               <atom:link rel="payment" title="Donate!" href="https://www.ipfire.org/donate" type="text/html" />
+       <title>IPFire Blog</title>
+       <subtitle>The official blog of the IPFire Project</subtitle>
+       <logo>https://www.ipfire.org{{ static_url("img/tux/ipfire_tux_32x32.png") }}</logo>
+       <updated>{{ now.isoformat() }}Z</updated>
 
-               {% for post in posts %}
-                       <item>
-                               <title>{{ post.title }}</title>
-                               <link>https://blog.ipfire.org/post/{{ post.slug }}</link>
+       {% for post in posts %}
+               <entry>
+                       <id>https://blog.ipfire.org/post/{{ post.slug }}</id>
+                       <title type="html">{{ post.title }}</title>
+                       <link href="https://blog.ipfire.org/post/{{ post.slug }}" rel="alternate" type="text/html" title="{{ post.title }}" />
+                       <author>
+                               <name>{{ post.author }}</name>
                                {% if isinstance(post.author, accounts.Account) %}
-                                       <author>{{ post.author.email }} ({{ post.author.name }})</author>
-                               {% else %}
-                                       <author>{{ post.author }}</author>
+                                       <email>{{ post.author.email }}</email>
                                {% end %}
-                               <pubDate>{{ post.published_at.strftime("%a, %d %b %Y %H:%M:%S +0200") }}</pubDate>
-                               <guid isPermaLink="true">https://blog.ipfire.org/post/{{ post.slug }}</guid>
-                               <description><![CDATA[{% raw post.html %}]]></description>
-                       </item>
-               {% end %}
-       </channel>
-</rss>
+                       </author>
+                       <published>{{ post.published_at.isoformat() }}Z</published>
+                       <updated>{{ post.updated_at.isoformat() }}Z</updated>
+                       <content type="html"><![CDATA[{% raw post.html %}]]></content>
+               </entry>
+       {% end %}
+</feed>