58

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 %}           
Amit
  • 715
  • 1
  • 5
  • 9

2 Answers2

106
{% comment %}
{% include navbar.html %}
{% endcomment %}
David Jacquel
  • 46,880
  • 4
  • 106
  • 132
19

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

mccambridge
  • 910
  • 7
  • 16