Mention config.mode

This commit is contained in:
Vincent Prouillet 2021-11-30 10:22:52 +01:00
parent 35359fb312
commit 10a39e57ff

View File

@ -23,6 +23,8 @@ A few variables are available on all templates except feeds and the sitemap:
Config variables can be accessed like `config.variable`, in HTML for example with `{{ config.base_url }}`. Config variables can be accessed like `config.variable`, in HTML for example with `{{ config.base_url }}`.
The 404 template does not get `current_path` and `current_url` (this information cannot be determined). The 404 template does not get `current_path` and `current_url` (this information cannot be determined).
On top of the `config` attributes mentioned above, it also gets `config.mode` which is whether it's run in `build`, `serve` or `check`.
## Standard templates ## Standard templates
By default, Zola will look for three templates: `index.html`, which is applied By default, Zola will look for three templates: `index.html`, which is applied
to the site homepage; `section.html`, which is applied to all sections (any HTML to the site homepage; `section.html`, which is applied to all sections (any HTML