{%- if config.extra.meta_position %}{%- if config.extra.meta_position == “bottom” %}
…do stuff
{%- endif %}{%- endif %}
I write it this way so that if the value does not exist in config.toml then zola can still build, but I am wondering if there might be a better way to write this.
I am not sure there is a way around this currently.
Currently the following compiles without errors but does not produce any output
{% if config.extra.notfound | default(value=“no”) == “no” %}
NO
{% else %}
YES
{% endif %}
But this is such a common pattern that I wonder if Tera should support a keyword (eg “with” not sure it is worth doing just for this) or a built-in function like the existing default filter
eg