How do you comment out in Liquid?

前端 未结 5 1856
轻奢々
轻奢々 2020-12-29 00:48

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

5条回答
  •  误落风尘
    2020-12-29 01:34

    Liquid allows you to leave un-rendered code inside a Liquid template by using the {% comment %} and {% endcomment %} tags.

    Input:

    Anything you put between {% comment %} and {% endcomment %} tags
    is turned into a comment.
    

    Output:

    Anything you put between  tags
    is turned into a comment.
    

    Reference documentation: Comment tag in Liquid

提交回复
热议问题