When writing a post about my Hugo experiences, I came across this issue of Hugo wanting to parse a shortcode in my examples.
This one just about drove me insane, but I found the answer here, and thought I should document it for myself and any other Hugo/Markdown noob that comes across this issue.
I tried to escape the code \
and even tried to use HTML entity code {
and }
for the curly braces. The solution, however, is to comment it out:
{{</* shortcode */>}}
Which will be render like this:
{{< shortcode >}}
Using comment syntax allows me to display the shortcode. It effectively treats the shortcode as a comment, so it is not executed or interpreted by Hugo.