[Proposal] Custom Output Formats

Hi, following discussion on the bugtracker, i took a little time to explicit what custom output format support could look like in Zola.

It’s all taking place on a pad following cooperation guidelines proposed on the bugtracker ⁽¹⁾ (these can of course be question and amended).

If something on the pad is not clear please point it out. I intend this draft document to slowly evolve into the actual documentation page about this particular feature.

Feel free to provide constructive criticism and outrage if i missed some obvious issue :slight_smile:

⁽¹⁾ Sorry i can’t post more than two links in a post as my account is new so you’ll have to search the page for “those guidelines”.


Now that 0.6 is out of the door we can look at that, I didn’t forget about it!

1 Like

Ok I understand better custom output formats now.

It does make sense to support that I think if we can make it easy to do so and it looks easier to implement than I thought.

Does anyone know open-source projects using them a lot in Hugo or something similar to see some use in real life?

I guess this is a very common pattern of what you would do with it. Apart from this, i unfortunately don’t have any source to show interesting examples :-/

I don’t think it would be so much harder to implement from scratch. The main issue i see is the current codebase has hardcoded defaults for HTML/RSS output and so we need to come up with some more generic logic. Or am i missing something?

In my opinion, “content kinds” (i.e. page/section templates) are a very useful mental tool to make custom output formats easier to implement and to use for website admins, because usually you only change output formats for a different content kind (like adding iCal output for “events” content kinds) or site-wide (like for RSS, or Algolia in the previous example).