Adding tags to the rss/atom feeds

I’d like to extend to RSS/Atom feeds with the <category> field as well. This is an optional field for each entry in the list of pages of the feed and is supported in both RSS [0] and Atom [1] specifications.

My idea is to have the page’s tags in the feed, for better aggregation in feed readers.

The only issue is that there’s no standard tag field in the page metadata. I saw some Zola Templates use a Taxonomy named tags for that. I’m going to use this taxonomy for the tags. Would a PR adding this to the feeds be accepted in Zola? Or is it out of the scope?

[0] RSS 2.0 Specification (Current)
[1] RFC 4287 - The Atom Syndication Format

It would be better for the docs to be updated to show how to add it to the template rather than adding it. Taxonomies are completely custom and language dependent so we can’t expect anything

Another approach I found is to add this to the templates:

{%- block extra_feed_entry %}
{% endblock extra_feed_entry -%}

This way the users can extend the feed without needing to write/copy the entire template.

Would this approach be worthy of a PR?

In any case, I’ll be happy to update the docs on how to do it.

I didn’t think about that! It’s fine to do a PR, we can bikeshed the name on it

Here’s my first iteration: template:feeds: add extra block by heitorPB · Pull Request #2263 · getzola/zola · GitHub

I’m struggling to get it working. @keats could you give a hand on the PR? I’m not sure what I am missing to get the tests to compile…

Oh, it turned out it didn’t work :confused: I updated the docs instead showing where to get the default template.