Skip to main content

LiquidSyntaxError

Identifies invalid Liquid syntax in tags, raw tags, branches, variable output, and parser errors. This check reports unknown tags, misplaced branch keywords, invalid raw tag markup, unclosed raw tags, and other Liquid syntax errors.

Fix syntax errors so Theme Check and Shopify can parse the file consistently.

Note

This check covers Liquid tag and output syntax. For HTML markup errors, see LiquidHTMLSyntaxError.


The following examples contain code snippets that either fail or pass this check.

In the following example, the {% liquid %} tag contains an unknown tag named hello:

{% liquid
hello world
%}

In the following example, the branch keywords are used inside tags that support them:

{% if product.available %}
Available
{% else %}
Unavailable
{% endif %}

{% case product.type %}
{% when 'Snowboard' %}
Snowboard
{% else %}
Product
{% endcase %}

The following example contains the default configuration for this check:

LiquidSyntaxError:
enabled: true
severity: error
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.

Anchor to Disabling this checkDisabling this check

Disabling this check isn't recommended.


Was this page helpful?