Search code examples
syntaxliquidcomments

How do you comment out in Liquid?


What is the correct way to comment out in the Liquid templating language?


Solution

  • In Liquid you comment out using the {% comment %} and {% endcomment %} tags:

    {% comment %} This is a comment in Liquid {% endcomment %}
    

    It doesn't matter if the comment is inline or a block comment.

    {% comment %}
        This is a block comment in Liquid
    {% endcomment %}