use dictsort filter in template

This commit is contained in:
Robert Kaussow 2019-11-18 09:23:03 +01:00
parent 89a281c2ca
commit 195e683c85
3 changed files with 3 additions and 2 deletions

View File

@ -5,3 +5,4 @@
* fix handling of multiline default values in template
* FEATURE
* use explicit marker to convert annotation values to json
* use dictsort filter in template for ordered variable list

View File

@ -3,7 +3,7 @@
{% set var = role.var | default({}) %}
{% if var %}
* [Default Variables](#default-variables)
{% for key, item in var.items() %}
{% for key, item in var | dictsort %}
* [{{ key }}](#{{ key }})
{% endfor %}
{% endif %}

View File

@ -2,7 +2,7 @@
{% if var %}
## Default Variables
{% for key, item in var.items() %}
{% for key, item in var | dictsort %}
### {{ key }}
{% if item.description is defined and item.description %}