What is the correct way to comment out in the Liquid templating language?
相关问题
- What does an “empty line with semicolon” mean in C
- Jekyll Error “Liquid Exception: undefined method `
- Is it possible to put only one option on a ternary
- JavaScript, confusing syntax when declaring a vari
- Getting Intel-syntax asm output from icc, instead
相关文章
- “no implicit conversion of Integer into String” er
- What is the meaning of this syntax?
- Check if variable is type of string or array in li
- How can I write-protect the Matlab language?
- Why the enum constants must be declared before any
- Jekyll - How can I make avoid a paragraph to be ad
- Does the img tag's alt attribute require encod
- SQL: Insert all records from one table to another
Liquid allows you to leave un-rendered code inside a Liquid template by using the
{% comment %}
and{% endcomment %}
tags.Input:
Output:
Reference documentation: Comment tag in Liquid
In the liquid, using comment tag enclose the text to be commented inside the comment tag
In Liquid you comment out using the
{% comment %}
and{% endcomment %}
tags:It doesn't matter if the comment is inline or a block comment.
In liquid, you use
{% comment %}
and{% endcomment %}
tags:You can also use it in block:
If the
{% comment %}
and{% endcomment %}
tags would comment anything, including HTML elements and such: