Use the value of `config.short_feed` in the `/rss` route.

This commit is contained in:
Fabio Manganiello 2023-05-01 23:27:18 +02:00
parent 0eb29e8c5a
commit 7530ecf7ba
2 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# Changelog # Changelog
## 0.2.18 ## 0.2.19
- Added `short_feed` configuration flag to permanently disable returning the - Added `short_feed` configuration flag to permanently disable returning the
full content of the articles in the RSS feed. full content of the articles in the RSS feed.

View File

@ -153,8 +153,13 @@ def rss_route():
<item> <item>
<title>{title}</title> <title>{title}</title>
<link>{base_link}{link}</link> <link>{base_link}{link}</link>
<pubDate>{published}</pubDate> <pubDate>{published}</pubDate>"""
<description><![CDATA[{content}]]></description> + (
"<description><![CDATA[{content}]]></description>"
if not config.short_feed
else ""
)
+ """
<media:content medium="image" url="{base_link}{image}" width="200" height="150" /> <media:content medium="image" url="{base_link}{image}" width="200" height="150" />
</item> </item>
""".format( """.format(