How do I add a page in each taxonomy folder?

Let us take the implementation of an RSS feed as an example, ignoring the fact that Hugo already has this function.

How do I add a page in each category and tag folder that shares the same code?

For example, feed.rss file, in each folder. Of course it’s not a static page, it must be generated based on the context.

Sorry, but I just don’t understand how to do this.

Your question is unclear, but it sounds like you want to define (or perhaps redefine) a custom output format.

Thank you but RSS was just an example of a page generated under all sections sharing the same template.

The question is how I add a page under each section folder. Let’s say i have /movies and /songs, I want to add under both of them a custom.html file. I want to do that on all the taxonomies I defined, not manually. And sharing some layout file, not a static one.

RSS is an example of what I want to do. But it won’t be a different format, just simple HTML pages. The thing in common is that you define a template once, and somehow you get a page generated by that in each taxonomy folder.

So the idea was more: how do I create RSS from scratch? I know how to do that only as a single feed file. But not how to generate a file for each taxonomy.

If I understand you correctly, you need a custom output format, generated for page kinds taxonomy and term.

Thank you. I think that was the correct answer. The wording was confusing but after looking into it I think it’s what I need.

So I add something under outputFormats, and use it under outputs. But that force me to also specific standard things there or they will be not anymore rendered which is slighly annoying.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.