rougail-output-doc/tests/docs/examples/60_1family_dynamic_jinja.md

36 lines
506 B
Markdown
Raw Normal View History

2024-11-15 08:13:45 +01:00
---
gitea: none
include_toc: true
---
# dictionaries/rougail/00-base.yml
```yaml
---
version: '1.1'
var: # a suffix variable
- val1
- val2
dyn{{ identifier }}:
description: A dynamic family
dynamic:
jinja: |
{% for val in _.var %}
{{ loop.index }}
{% endfor %}
description: index of suffix value
var: val # a dynamic variable
```
# Example with all variables modifiable
```yaml
---
rougail:
var:
- val1
- val2
dyn1:
var: val
dyn2:
var: val
```