LiquidHTMLSyntaxError
Last edit: Apr 01, 2026
LiquidHTMLSyntaxError
Severity: error | Type: LiquidHtml | Aliases: SyntaxError, HtmlParsingError
This check informs you of Liquid and HTML syntax errors early, aiming to eliminate syntax errors in Liquid templates. It covers both Liquid syntax problems and HTML parsing errors in the same file.
Common Liquid syntax errors detected:
- Missing closing tags (e.g.
{% include 'x'without closing%}) - Malformed assignments (e.g.
{% assign foo = 1 }}) - Unknown tags
- Invalid conditional syntax (e.g. using
|instead of.for size checks)
Examples
✗ Incorrect Code Example (Avoid using this):
{% include 'muffin'
{% assign foo = 1 }}
{% unknown %}
{% if collection | size > 0 %}
✓ Correct Code Example (Use this instead):
{% render 'muffin' %}
{% assign foo = 1 %}
{% if collection.size > 0 %}
Configuration
The default configuration for this check:
LiquidHTMLSyntaxError:
enabled: true
severity: error
Disabling This Check
Disabling this check is not recommended. Syntax errors prevent your templates from rendering correctly.