Skip to content

Commit c497034

Browse files
committed
Add feature to add rel param to rss feedss if requested
1 parent d9b2bc3 commit c497034

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pelican/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def load_source(name, path):
4848
"TRANSLATION_FEED_ATOM": "feeds/all-{lang}.atom.xml",
4949
"FEED_MAX_ITEMS": 100,
5050
"RSS_FEED_SUMMARY_ONLY": True,
51+
"RSS_REL": False,
5152
"SITEURL": "",
5253
"SITENAME": "A Pelican Blog",
5354
"DISPLAY_PAGES_ON_MENU": True,

pelican/writers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ def _add_item_to_the_feed(self, feed, item):
5353
title = Markup(item.title).striptags()
5454
link = self.urljoiner(self.site_url, item.url)
5555

56+
if self.settings["RSS_REL"]:
57+
link = link + "?rel=rss"
58+
5659
if isinstance(feed, Rss201rev2Feed):
5760
# RSS feeds use a single tag called 'description' for both the full
5861
# content and the summary

0 commit comments

Comments
 (0)