Hello there,
I’d like to know if there is a way to generate atom/rss feeds for each sections. Right now Zola is generating one feed for all sections of my site at the root URL of my site, i.e. www.yaroslavps.com/feed.xml. I’ve got two sections in my site - “weblog” and “food” - I’d like to know if there is a way to generate separate feeds for each of them in each of the section’s root URL, i.e. /weblog/feed.xml and /food/feed.xml
Is it currently possible to do this in Zola, and if so, how do I do it?
Right now feeds are either global and/or per taxonomy. I would take a PR for feeds per section but it needs some thoughts: does it include only the direct pages or also the sub-sections pages?
I have been thinking about it for the last couple of days, and I thought that a possible solution would be to provide a “generate_feed” or “generate_subfeed” variable in the front matter of the section/subsection’s _index.md file, and if that variable is true, then generate an atom/rss feed for that section/subsection.
Another idea, coupled with that first idea, is to maybe add a “exclude_from_root_feed” variable to the _index.md of sections so that you can exclude the feed from the root/global feed and/or any parent section’s feeds.
I am not yet very versed in Rust, but I am willing to contribute to this feature. After all, it would also help me put my knowledge of Rust to practice
I think generate_feed = true in a section/subsection _index.md should generate feeds for that particular section/subsection. If any of those is set to false, then all the content in that section/subsection should probably be excluded from the main root feed.
And a section feed would contain all the content from it’s subsections too. So, if a subsection has feed set to false, then that subsection won’t be visible in the section feed or the main root feed.
A PR for the feature has been merged in next (https://github.com/getzola/zola/pull/1128) which only takes the direct pages for the feed. I’m not convinced a section feed should contain its subsection pages as well though.
I wasn’t sure whether to include subsections or not. We can revisit if it makes more sense to include them, the usecases I had in mind didn’t have subsections.