v9.38.0
Add comments to a Liquid template using an inline tag. Text enclosed in an inline comment tag will not be printed.
Input
1 | Anything inside an inline comment tag will not be printed. |
Output
1 | Anything inside an inline comment tag will not be printed. |
Inline comments are useful inside liquid tags too.
1 | {% liquid |
But they don’t work well for commenting out blocks of Liquid code. The comment block tag is the better option when you need to temporarily stop other tags from being executed.
Input
1 | {%- # {% echo 'Welcome to LiquidJS!' %} -%} |
Output
1 | -%} |