Best practices on omitting pages from RSS and how to get an image on a feed

(1) I am seeking guidance on best practices for omitting pages from RSS - for example, omitting evergreen pages such as about and contact. I saw this discussion but it is a bit dated and I am not sure if the advice still holds? If so, can someone be more explicit with the “how”?

(2) I would also like to know how to get an image to properly display in feed readers. Specifically an image for the entire feed not for each item in the feed as discussed here. I have placed what I thought were the appropriate image XML elements in my _default > rss.xml file, but when I look at my feed in inoreader or feedly, I do not have a any type of image displayed?

My repo is available here, or you can look at the site here.

I don’t think there is a best practice defined. The way I did it was using the .Params available.

Frontmatter shows unlisted: true and I make sure it doesn’t get listed:

{{ range first 50 (where .Data.Pages ".Params.unlisted" "!=" true) }}
    (...)
{{ end }}

You can see the result here: https://github.com/brunoamaral/future-imperfect-DI/

Thank you. So it seems like a where clause in the rss.xml is still the way to go. I suppose you could also do something like where .Data.Pages "Section" "blog" or where .Data.Pages "Type" "blog" to restrict the rss feed to only contain pages under content/blog, correct?

Still not sure why my image seems to be inconsistent across feed readers and I’m noticing some weird caching in the feed items – my jacked up commit history and various code pushes probably do not help :roll_eyes:

Yes, you could do that, or have all the unlisted content in the same section and place a blank rss template for that section.

I like this approach because it gives me more freedom to mark anything as unlisted.

1 Like