Debian Codegraph @

docs/howto/include-in-template.md

raw
1 # Include files or templates in templates
2
3 [Jinja2](https://jinja.palletsprojects.com/en/2.11.x/templates/) provides the ability to include an external file/template from within a template with the directive `include`. See the [related docs](https://jinja.palletsprojects.com/en/2.11.x/templates/#include) for more. The path must be relative to the `dotpath`.
4
5 For example:
6 ```yaml
7 {%@@ include 'colors/black.colors' @@%}
8 ```
9
10 Of course, paths could be also dynamically generated using variables.
11 For example:
12 ```yaml
13 {%@@ include colors_path + '/black.colors' @@%}
14 ```