summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/pyssg/rss.py7
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bbe5f7c..4d9d286 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
CHANGES
=======
+* add content:encoded tag in rss and update readme
+
v0.3.0
------
diff --git a/src/pyssg/rss.py b/src/pyssg/rss.py
index 4cd4695..742b6b2 100644
--- a/src/pyssg/rss.py
+++ b/src/pyssg/rss.py
@@ -7,6 +7,8 @@ from .configuration import Configuration
VERSION = importlib.metadata.version('pyssg')
+# This is static right here since an rss feed
+# requires very specific date format
DFORMAT = '%a, %d %b %Y %H:%M:%S GMT'
@@ -46,6 +48,11 @@ class RSSBuilder:
i_f = f'{i_f} <link>{url}</link>\n'
i_f = f'{i_f} <guid isPermaLink="true">{url}</guid>\n'
i_f = f'{i_f} <pubDate>{date}</pubDate>\n'
+ # TODO: maybe make this optional?
+ # add the tags as categories
+ if p.tags is not None:
+ for t in p.tags:
+ i_f = f'{i_f} <category>{t.capitalize()}</category>\n'
i_f = f'{i_f} <description>{p.summary}</description>\n'
i_f = f'{i_f} <content:encoded><![CDATA[{p.html}]]></content:encoded>\n'
i_f = f'{i_f} </item>\n'