Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you comment out in Liquid?

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

like image 603
Martin Buberl Avatar asked Nov 19 '14 01:11

Martin Buberl


People also ask

How do you comment out in HTML?

The HTML Comment Tag Comments in HTML start with <! -- and end with --> . Don't forget the exclamation mark at the start of the tag! But you don't need to add it at the end.

What is liquid expression?

Liquid is an open-source template language created by Shopify. Liquid uses a combination of objects, tags, and filters inside template files to display dynamic content.

How do you add a comment on Shopify?

From the Shopify app, tap Store. In the Sales channels section, tap Online Store. Tap Blog posts. Tap the ⋮ button beside Blog posts, and then select Manage comments.


1 Answers

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 %} 
like image 196
Martin Buberl Avatar answered Jan 15 '23 04:01

Martin Buberl