summaryrefslogtreecommitdiff
path: root/theme/templates/feed.xml
diff options
context:
space:
mode:
authorPhilipp Geyer <philipp@geyer.co.uk>2022-01-22 14:12:35 +0000
committerPhilipp Geyer <philipp@geyer.co.uk>2022-01-22 14:12:35 +0000
commitba4e78346aac1843890c1a889807b8e60bdf9419 (patch)
tree5982ccc113872b20db69005bf8bb2addff492571 /theme/templates/feed.xml
parent93ea64f62c8056a532367600f53f69d4daa79ea3 (diff)
Some work on my website - should be looking half decent finally, and have some content
Diffstat (limited to 'theme/templates/feed.xml')
-rw-r--r--theme/templates/feed.xml44
1 files changed, 44 insertions, 0 deletions
diff --git a/theme/templates/feed.xml b/theme/templates/feed.xml
new file mode 100644
index 0000000..5cf001c
--- /dev/null
+++ b/theme/templates/feed.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<rss version="2.0"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xmlns:wfw="http://wellformedweb.org/CommentAPI/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
+ xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
+ xmlns:georss="http://www.georss.org/georss"
+ xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+ xmlns:media="http://search.yahoo.com/mrss/">
+ <channel>
+ <title>Simple Blog</title>
+ <atom:link
+ href="{{ url_for("feed") }}"
+ rel="self" type="application/rss+xml" />
+ <link>{{ url_for("index") }}</link>
+ <description><![CDATA[]]></description>
+ <language>en</language>
+ <pubDate>{{ posts | first | getattr("date") | strftime("%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
+ <lastBuildDate>{{ now() | strftime("%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
+ <generator>{{ meta.generator }}</generator>
+ <webMaster>web@master (Blog Author)</webMaster>
+ <image>
+ <url>{{ url_for("index") }}media/img/8bitme.png</url>
+ <title>Blog Author</title>
+ <link>{{ url_for("index") }}</link>
+ </image>
+
+ {% for post in posts %}
+ <item>
+ <title>{{ post.title }}</title>
+ <link>{{ url_for("posts", slug=post.slug) }}</link>
+ <author>{{ post.author|default("author@mail.com (Blog Author)") }}</author>
+ <guid isPermaLink="false">{{ url_for("posts", slug=post.slug) }}</guid>
+ {% if post.date is defined %}
+ <pubDate>{{ post.date|strftime("%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
+ {% endif %}
+ <description><![CDATA[{{ post.html|safe }}]]></description>
+ </item>
+ {% endfor %}
+
+ </channel>
+</rss>