puput icon indicating copy to clipboard operation
puput copied to clipboard

Do not publish to RSS feed if Blog post is "Private"

Open dawnwages opened this issue 2 years ago • 0 comments

Hi Team,

Goal: When I publish a page that has the "Private" Wagtail setting, it will not publish to my RSS feed. Tweaking the BlogPageFeedGenerator feeds.py seems like the answer.

class BlogPageFeedGenerator(Rss201rev2Feed):
    def add_root_elements(self, handler):
        super(BlogPageFeedGenerator, self).add_root_elements(handler)
        if self.feed['image_link']:
            handler.addQuickElement(
                'image',
                '',
                {
                    'url': self.feed['image_link'],
                    'title': self.feed['title'],
                    'link': self.feed['link'],
                }
            )

Could you please advise if I'm correct and to share this issue in case others would benefit.

dawnwages avatar Jun 22 '23 00:06 dawnwages