mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 18:34:48 +00:00
_vars for #404
This commit is contained in:
11
docs/template/template-variables.md
vendored
11
docs/template/template-variables.md
vendored
@@ -54,4 +54,13 @@ It's possible to access environment variables inside the templates:
|
||||
This allows for storing host-specific properties and/or secrets in environment variables.
|
||||
It is recommended to use `variables` (see [config variables](../config/config-file.md#variables))
|
||||
instead of environment variables unless these contain sensitive information that
|
||||
shouldn't be versioned in Git (see [handle secrets doc](../howto/sensitive-dotfiles.md)).
|
||||
shouldn't be versioned in Git (see [handle secrets doc](../howto/sensitive-dotfiles.md)).
|
||||
|
||||
## Variables dictionary
|
||||
|
||||
All variables are also available through the dictionary `_vars`
|
||||
```
|
||||
{%@@ for key in _vars @@%}
|
||||
key:{{@@ key @@}} - value:{{@@ _vars[key] @@}}
|
||||
{%@@ endfor @@%}
|
||||
```
|
||||
Reference in New Issue
Block a user