Closed brutus closed 9 years ago
I don't agree for a number of reasons.
The same request for jekyll was held off for a long time. Now they seem to have added this, but with the expected complications of scoping rules, default handling and syntax. I don't like it.
Usually I do use various layouts, for example to switch between column widths for content (e.g. to render pages with source code better.), or to switch between a page with or without a sidebar. Also, I sometimes use a subfolder for content, with a dedicated layout of its index file. With template inheritance, we can easily generate useful variations, and there is nothing against using that feature to have a wide range of useful layouts.
Moreover, it is the layout attribute that triggers python validator functions, if any, enabling fine-grained control.
Changing the default layout for more sophisticated sites would therefore require to go into several pages to add the correct layout anyway. This means you probably wouldn't want to do that, so the feature would not add flexibility.
The current implementation, with the layout as almost the only mandatory attribute, is simple and transparant, and I would prefer to keep it like that.
Generally all pages under a folder (with it's own
index.md
) use the samelayout
- given a few exceptions. It would be nice if we could set a (default)layout
in thoseindex.md
file(s), instead of needing to set it in everypagex.md
(butpagex.md
should be able to overwrite this default).