codex icon indicating copy to clipboard operation
codex copied to clipboard

allow default layouts

Open dherman opened this issue 12 years ago • 2 comments

The fact that codex lets me have nested directories is the killer feature I need for the TC39 wiki, which many other static site generators (like Jekyll) don't seem to support. But it would be great if nested directories could default to their parents' layouts, instead of having to create new layout files for every child.

Dave

dherman avatar Jul 20 '12 06:07 dherman

You can currently use the template header tag in the markdown file to overwrite which template to use so you don't have tons of template files. The template name is the filename of the template without the .jade extension.

I will see about having the pages plugin intelligently traverse up its parent's tree to find an available template. Until then, this will allow to clean up your template folder.

logicalparadox avatar Jul 20 '12 06:07 logicalparadox

I don't think that would be much of an improvement since there are generally many more .md files than templates. This isn't a deal-breaker or anything, but I think defaulting up the parent hierarchy would be a good convenience to support.

Thanks, Dave

dherman avatar Jul 20 '12 16:07 dherman