Prevent parsing of shortcodes inside code blocks

365 views Asked by At

I want to write a tutorial about Hugo, so I write a shortcode syntax in markdown, but I don't want to render it; I want it as normal text.

{{< ref "/page/about" >}}

When I run hugo server, it shows me: page not found, so obviously, it treats it as a shortcode.

How can I fix it?

1

There are 1 answers

0
Carson On BEST ANSWER

You only need to adds /* */ in your shortcode and down. For example,

{{</* ref "/page/about" */>}}