Guts/mkdocs-rss-plugin

New feature: easily customisable jinja2 templates per-feed?

Opened this issue · 2 comments

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

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:

  • compliance is essential (despite some deviations, notably on the formalism of the authors). RSS being old mature, there are indeed a bunch of extensions starting with those pushed by Yahoo and Feedly. If possible, it is preferable to push the variability of the "core" template.
  • Now maybe it's time to also use a template for the JSON Feed so that you can handle things the same way?
  • the codebase is growing and I think it's the a good opportunity to continue on refactoring as I do for last versions. This evolution would imply a lot of new code and complexity. Let's take our time to make it sustainable please.

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