How do I comment out content in Hugo?
If I have notes, unfinished thoughts, I'd like to leave them in the .md
file but not have them appear in the html
.
<!--
tags don't seem to work -- it doesn't even become a html comment, it remains visible text on the page.
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.
You can do this (YAML block): ~~~ # This is a # multiline # comment ...
Hugo uses Go templates under the hood, so the comment syntax is {{/* a comment */}}
. Anything inside the comment will not be rendered to the resulting HTML files.
Official Hugo comments documentation
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