aboutsummaryrefslogtreecommitdiffstats
path: root/templates/feed.xml
diff options
context:
space:
mode:
authormjfernez <mjfernez@gmail.com>2021-10-14 20:14:53 -0400
committermjfernez <mjfernez@gmail.com>2021-10-14 20:14:53 -0400
commitc583a69362f86fcc8e1b35a45a06dd8377d6308f (patch)
tree30609b89aa2781c95fc5c04ff96db3ab063e16e7 /templates/feed.xml
parentf7668243b7a55d1f69d508b3baaf891055715f63 (diff)
downloadezcms-c583a69362f86fcc8e1b35a45a06dd8377d6308f.tar.gz
Adds RSS auto-generation for files in 'site'
This commit adds rss_generator.py which contains the main logic for indexing the site directory and generating a feed on startup. It serves as a sort of ad-hoc database which is accessed when /feed.xml is requested. Also corrects various typos, README nonsense, and expands the config options for RSS. Instances of './templates/site' have been replaced with the general BASE_DIR variable in the siteconfig.
Diffstat (limited to 'templates/feed.xml')
-rw-r--r--templates/feed.xml27
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/feed.xml b/templates/feed.xml
new file mode 100644
index 0000000..a252134
--- /dev/null
+++ b/templates/feed.xml
@@ -0,0 +1,27 @@
+
+<rss version="2.0">
+ <channel>
+ <title>{{ config.TITLE }}</title>
+ <link>{{ config.LINK }}</link>
+ <description>{{ config.DESCRIPTION }}</description>
+ <!-- Optional -->
+ <language>{{ config.LANGUAGE }}</language>
+ <pubDate> {{ config.PUBDATE }}</pubDate>
+ <lastBuildDate> {{ config.LASTBUILDDATE }}</lastBuildDate>
+ <docs>{{ config.DOCS }}</docs>
+ <generator>{{ config.GENERATOR }}</generator>
+ <managingEditor>{{ config.AUTHOR }}</managingEditor>
+ <webMaster>{{ config.WEBMASTER }}</webMaster>
+ {% for item in items %}
+ <item>
+ <title>{{ item.TITLE }}</title>
+ <link>{{ item.LINK }}</link>
+ <guid>{{ item.LINK }}</guid>
+ <description>{{ item.DESCRIPTION }}</description>
+ <pubDate>{{ item.LAST_UPDATE }}</pubDate>
+ <category>{{ item.SITE_DIR }}</category>
+ <author>{{ config.AUTHOR }}</author>
+ </item>
+ {% endfor %}
+ </channel>
+</rss>