logicalparadox / codex

Static site and documentation generator. Markdown for content. Jade/stylus for templates.
64 stars 8 forks source link

allow default layouts #18

Open dherman opened 12 years ago

dherman commented 12 years ago

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

logicalparadox commented 12 years ago

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.

dherman commented 12 years ago

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