Guts / mkdocs-rss-plugin

MkDocs plugin to generate a RSS feeds for created and updated pages, using git log and YAML frontmatter (page.meta).
https://guts.github.io/mkdocs-rss-plugin/
MIT License
80 stars 27 forks source link

New feature: easily customisable jinja2 templates per-feed? #297

Open toomanybrians opened 2 months ago

toomanybrians commented 2 months ago

I'm just now getting my site and feed setup, and it seems like there are an infinite number RSS feed configuration options in the world. (Custom icons, metadata, etc.) I would like to be able to have more control of the generated feed from this plugin, and it seems like the easiest way to do this would be similar to how Material for MkDocs handles it, with the ability to add a jinja2 template to a project, based on templates/rss.xml.jinja2 as a starting point.

I would envision this could be enabled with an additional config option, such as rss_feed_template:, since I would want to be able to use different templates when multiple feeds are used.

I would be happy to write this feature. It's something I need to do for myself anyway, and it would be easy to make it universal. But I wanted to see if this was a feature that would be valuable here, and, if you have any thoughts or suggestions on what I consider before I create it.

Thanks! Brian

Guts commented 2 months ago

Thank you for the interest in this project and the dynamic contribution. I really appreciate.

Concerning the evolution proposal, it is clearly on the path of evolution of the plugin. Moreover, from the initial design, I had varied the path of the template to facilitate customization.

Some remarks to move forward:

toomanybrians commented 2 months ago

Everything you're saying makes sense to me. At this point, I don't have a lot of time to offer as I'm trying to get my site launched. But I'll keep this open and keep watching this project and maybe I can come back around to do a proper implementation of this once my crunch time is over?

For now I might just fork it and make this change for myself since I need to get something done ASAP, but I'll look more at the code as I'm doing it and think about it.

Just out of curiousity, what is the JSON feed used for in the real world?

Thanks! Brian