mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
docs: Update frontmatter template override documentation
This commit is contained in:
parent
505244bea2
commit
779cd8571c
|
@ -135,7 +135,7 @@ The following keys are supported:
|
||||||
*template*
|
*template*
|
||||||
Optionally specifies the name of the template to use when building this
|
Optionally specifies the name of the template to use when building this
|
||||||
page. If unspecified, defaults to "page" for regular pages and "index" for
|
page. If unspecified, defaults to "page" for regular pages and "index" for
|
||||||
index pages.
|
index pages. The template is then found according to *TEMPLATE RESOLUTION*.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -244,6 +244,9 @@ Fallback templates can be specified in the templates/\_default/ directory. These
|
||||||
templates will apply only when the required kind of template is not found in the
|
templates will apply only when the required kind of template is not found in the
|
||||||
template directory.
|
template directory.
|
||||||
|
|
||||||
|
The template for a specific page can be overridden by setting the *template* key
|
||||||
|
in the page's frontmatter. See *FRONTMATTER* for more details.
|
||||||
|
|
||||||
For example, the page file content/blog/my_first_post.gmi will be rendered with
|
For example, the page file content/blog/my_first_post.gmi will be rendered with
|
||||||
the template templates/blog/page.ext. If that template is not found, it falls
|
the template templates/blog/page.ext. If that template is not found, it falls
|
||||||
back to templates/\_default/page.ext. If that template is also not found, then
|
back to templates/\_default/page.ext. If that template is also not found, then
|
||||||
|
@ -253,6 +256,8 @@ Base templates also follow the same rules. For example, the index template
|
||||||
templates/blog/index.ext inherits firstly from templates/blog/base.ext, and
|
templates/blog/index.ext inherits firstly from templates/blog/base.ext, and
|
||||||
then falls back to templates/\_default/base.ext if present.
|
then falls back to templates/\_default/base.ext if present.
|
||||||
|
|
||||||
|
There is no override mechanism for base templates.
|
||||||
|
|
||||||
## PARTIAL TEMPLATES
|
## PARTIAL TEMPLATES
|
||||||
|
|
||||||
Partial templates can be placed in the templates/\_partials directory.
|
Partial templates can be placed in the templates/\_partials directory.
|
||||||
|
|
Loading…
Reference in a new issue