Update default template docs to match 3.3.0
This commit is contained in:
parent
7e04250e62
commit
ac73229737
1 changed files with 10 additions and 13 deletions
|
@ -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 }}" %}
|
||||||
|
|
Loading…
Reference in a new issue