1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 18:28:55 +00:00
Files
dotdrop/docs/howto/include-in-template.md
2020-09-15 21:58:33 +03:00

15 lines
566 B
Markdown

# Include file or template in template
[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 doc](https://jinja.palletsprojects.com/en/2.11.x/templates/#include) for more. The path must be relative to the `dotpath`.
For example:
```yaml
{%@@ include 'colors/black.colors' @@%}
```
Of course, paths could be also dynamically generated using variables.
For example:
```yaml
{%@@ include colors_path + '/black.colors' @@%}
```