I have 4-5 sections which I want to render with the same layout.
I have considered multiple solutions, but I don’t know which one would be the best.
Set the layout in front matter for each single post.
This is repetitive and error-prone. Is it possible to set the layout recursively?
Place them under a top level section, and set the path in front matter.
This is also repetitive and error-prone. Is it possible to set the path of a section, and all subsections would be under that path?
Symlink the templates in layouts.
It isn’t repetitive at least. Also, it looks less error-prone than the previous two.
There is an open issue to simplify what you’re looking for … we will eventually get to it. I think the gist of that issue is to allow setting Type recursively; there is also a related issue about being smarter about baes template lookups.
I think the simplest way to get what you want today is to duplicate the sections below /layouts and create templates here that is as DRY as possible (using partials and base templates).