This exposes mustache partials to users. Any file saved under a new partials directory (defaults to /partials, configurable) will be loaded and passed to the mustache engine at build time. Partials can be referenced in pages by their slugs, e.g. /partials/nav.html :point_right: {{ > nav }}.
It also comes with a breaking change for templates. Instead of saving template files anywhere and referencing them by their path (e.g. template: /templates/default.html), templates now must be saved to a new templates directory (defaults to /templates, configurable). They can be referenced in frontmatter by their slugs, e.g. /templates/default.html :point_right: template: default. Besides aligning the templates and partials APIs, one major benefit of this is that brut can load all templates once at the beginning of the build, instead of having to load them on the fly as their path is read from frontmatter. I expect significant build time improvements.
Closes #28, #32
This exposes mustache partials to users. Any file saved under a new partials directory (defaults to
/partials
, configurable) will be loaded and passed to the mustache engine at build time. Partials can be referenced in pages by their slugs, e.g./partials/nav.html
:point_right:{{ > nav }}
.It also comes with a breaking change for templates. Instead of saving template files anywhere and referencing them by their path (e.g.
template: /templates/default.html
), templates now must be saved to a new templates directory (defaults to/templates
, configurable). They can be referenced in frontmatter by their slugs, e.g./templates/default.html
:point_right:template: default
. Besides aligning the templates and partials APIs, one major benefit of this is that brut can load all templates once at the beginning of the build, instead of having to load them on the fly as their path is read from frontmatter. I expect significant build time improvements.