hugo

How to comment out content in Hugo


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.


Solution

  • See this example for a no-op shortcode that can be used to add comments in content files:

    https://github.com/gohugoio/hugoDocs/blob/master/layouts/shortcodes/todo.html