Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dawnwages opened this issue Jun 22, 2023 · 0 comments
Open

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

dawnwages opened this issue Jun 22, 2023 · 0 comments

Comments

@dawnwages
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant