Comment out an include statement inside an HTML file using Jekyll

CommentsJekyll

Comments Problem Overview


Is there a way to comment out an include statement inside an HTML file using Jekyll?

For example I have this inside one of my HTML files that I'd like to temporarily comment out. Standard HTML comment doesn't seem to work.

{% include navbar.html %}			

Comments Solutions


Solution 1 - Comments

{% comment %}
{% include navbar.html %}
{% endcomment %}

Solution 2 - Comments

Jekyll uses the Liquid templating system. So whatever works for Liquid works for Jekyll.

{% comment %}
this is commented out
{% endcomment %}

https://help.shopify.com/themes/liquid/tags/theme-tags#comment

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAmitView Question on Stackoverflow
Solution 1 - CommentsDavid JacquelView Answer on Stackoverflow
Solution 2 - CommentsmccambridgeView Answer on Stackoverflow