Last tested: Nov 30, 2020
Liquid tags can't have spaces between {
and %
or %
and }
.
For example, if we have:
{% if view_name.field_name._in_query %}
something to insert if true
{% else %}
something to insert if false
{ % endif % }
...we will see this error because the last line { % endif % }
has these extra spaces. Removing any extra spaces (i.e., using {% endif %}
) will resolve the error.
Other possible syntax issues (https://talk.jekyllrb.com/t/liquid-if-statement-error/2953):
%
somewhere.This content is subject to limited support.