{% comment %}

The {% comment %} tag prevents anything inside it from being executed or output. It is primarily used for one of two purposes:

  1. For a developer to leave notes behind so that when they or another developer looks at the code later they understand what it is doing.
  2. To temporarily "remove" a block of code from a template so that it is no longer evaluated but is easy to add back later. This is particularly helpful when troubleshooting a template error.

Syntax

{% comment %}...{% endcomment %}

Examples

{% comment %}This is what this template does:
1. Do something
2. Do something else
{% endcomment %}

1. Do Something
{% comment %}
    <!-- Note: This appears to break the template. -->
    2. Do something else
{% endcomment %}

Developer Overview

Liquid Markup