1
0
Fork 0
mirror of synced 2024-12-21 22:21:08 -05:00

Update default template docs to match 3.3.0

This commit is contained in:
Erik Flodin 2024-12-05 22:29:13 +01:00
parent 7e04250e62
commit ac73229737
No known key found for this signature in database
GPG key ID: 420A7C865EE3F85F

View file

@ -95,17 +95,14 @@ whitespace between the variable name and the double braces. The `{{` and
if-else-endif if-else-endif
: Entire blocks of content can be included or excluded based on the value of a : Entire blocks of content can be included or excluded based on the value of a
variable. Only equality can be tested. These blocks must start with variable. Both equality (`==`) and inequality (`!=`) can be tested. These
`{% if yadm.variable == "value" %}` and end with `{% endif %}`. An alternative blocks must start with `{% if yadm.variable == "value" %}` and end with
block can also be specified using the directive `{% else %}`. These directives `{% endif %}`. An alternative block can also be specified using the directive
must appear on lines by themselves. They may not appear on the same line. The `{% else %}`. These directives must appear on lines by themselves. They may not
"if" directive only supports testing a single variable, and there is no "elif" appear on the same line. The "if" directive only supports testing a single
directive as there is in Jinja. variable, and there is no "elif" directive as there is in Jinja. <br><br> If
<br><br> multiple classes are defined, `yadm.class=="someclass"` will be true if *any*
If multiple classes are defined, `yadm.class=="someclass"` will be true if *any* of the defined classes are "someclass". <br><br> Here is an example.
of the defined classes are "someclass".
<br><br>
Here is an example.
```jinja ```jinja
{% if yadm.os == "Darwin" %} {% if yadm.os == "Darwin" %}
@ -119,8 +116,8 @@ include
: Content can be included from external files using the : Content can be included from external files using the
`{% include "filename" %}` syntax. The filename may include variables and `{% include "filename" %}` syntax. The filename may include variables and
should be either a path relative to the current template or an absolute should be either a path relative to the current template or an absolute
path. The included file may itself also use variables, but if-else-endif or path. The included file may itself also use variables, if-else-endif and
include directives are not supported. An example: include directives. An example:
```jinja ```jinja
{% include "extra/config.{{ yadm.os }}" %} {% include "extra/config.{{ yadm.os }}" %}