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
: 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
`{% if yadm.variable == "value" %}` and end with `{% endif %}`. An alternative
block can also be specified using the directive `{% else %}`. These directives
must appear on lines by themselves. They may not appear on the same line. The
"if" directive only supports testing a single variable, and there is no "elif"
directive as there is in Jinja.
<br><br>
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.
variable. Both equality (`==`) and inequality (`!=`) can be tested. These
blocks must start with `{% if yadm.variable == "value" %}` and end with
`{% endif %}`. An alternative block can also be specified using the directive
`{% else %}`. These directives must appear on lines by themselves. They may not
appear on the same line. The "if" directive only supports testing a single
variable, and there is no "elif" directive as there is in Jinja. <br><br> 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.
```jinja
{% if yadm.os == "Darwin" %}
@ -119,8 +116,8 @@ include
: Content can be included from external files using the
`{% include "filename" %}` syntax. The filename may include variables and
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
include directives are not supported. An example:
path. The included file may itself also use variables, if-else-endif and
include directives. An example:
```jinja
{% include "extra/config.{{ yadm.os }}" %}