From c0b2fd2ab74280c9dbde861627d1ad5765acbb03 Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Sat, 10 Oct 2020 21:18:16 +0200 Subject: [PATCH] Add documentation for the template include directive --- _docs/070_templates.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/_docs/070_templates.md b/_docs/070_templates.md index d8f1f6c..338aa36 100644 --- a/_docs/070_templates.md +++ b/_docs/070_templates.md @@ -106,6 +106,17 @@ This block is included for any other OS {% endif %} ``` +include +: Content can be included from external files using the +`{% include "filename" %}` syntax. The filename may include variables and +should be either a path relative to the current template or an absolute +path. The included file may itself also use variables, but if-else-endif or +include directives are not supported. An example: + +```jinja +{% include "extra/config.{{ yadm.os }}" %} +``` + {% endraw %} [envtpl]: https://github.com/andreasjansson/envtpl