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 %}
In HTML, a comment is text enclosed within < ! ╌ ╌> tags. This syntax tells the browser that they are comments and should not be rendered on the front end. Thanks to the comments tag, you can leave notes to remind yourself where you left off in the build process.
An HTML comment begins with <! –– and the comment closes with ––> . HTML comments are visible to anyone that views the page source code, but are not rendered when the HTML document is rendered by a browser.
To use the HTML comment tag, place your insertion mark cursor at the location in the HTML code where you want to type the comment. Then type the start of the comment tag by typing <!
{% comment %} {% include navbar.html %} {% endcomment %}
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With