pelican icon indicating copy to clipboard operation
pelican copied to clipboard

Jinja template for XML files

Open matthewbellringer opened this issue 2 years ago • 1 comments

  • [x] I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • [x] I have searched the documentation and believe that my question is not covered.

Issue

I'd like to generate an XML file as part of the build of the website - in this case a podcast-compatible RSS feed - and, having read the documentation, do not understand how to go about this.

I understand how to write a Jinja2 template which will generate the correct XML. What I don't understand is how to make Pelican use that template to generate the file I need. Can I do that as part of a theme, or do I need to write an entire plugin?

matthewbellringer avatar Jun 22 '22 15:06 matthewbellringer

Perhaps you can just use Template Pages to render the xml template as page in pelican.

lioman avatar Jul 27 '22 09:07 lioman

Agree that a template page is the right tool for this.

GiovanH avatar Mar 30 '23 03:03 GiovanH

Thanks for the helpful responses, @lioman and @GiovanH! 👍

justinmayer avatar Mar 31 '23 12:03 justinmayer