Closed sc0ttj closed 4 years ago
This feature was added in this PR: https://github.com/sc0ttj/mdsh/pull/85
Except that the layout is defined as page_layout
, which can be set when creating a post, is saved in the front matter, and must match the name of a template file in .app/templates
.
When the user creates a new page or post, they should be able to change the layout of the page by setting a
$post_layout
variable.When creating pages or posts, users should give the
-all
option, and they will be asked to choose a post layout.Additionally, index pages should be build-able with specific layouts, using something like:
^ The functions in
.app/functions/**
should use the value of$post_layout
(or$page_layout
) to choose which template partial to use. If$post_layout
not a file name in templates, error out.To keep things tidy, different layouts could live in different dirs: