Hugo shortcode in Markdown code highlighting

I know there is a way to show Hugo shortcodes without having Hugo parse them in code highlighting. Something along the lines of this:

```
{{< shortcode >}}
```

will in a Hugo page be parsed and either trigger the shortcode or show an error depending on the markup. I know there is a way to add some form of comments so that the shortcode is displayed as above after Hugo is done with it. But I can’t find it in the documentation.

What’s the proper escaping for Hugo shortcodes in code highlighting? (also, where in the docs is this hidden and why not in the shortcode documentation AND the highlighting documentation?)

1 Like

Why not look at the shortcode documentation source:

Plenty of examples there.

2 Likes

Because I am stupid. :smiley: That totally did evade my “horizon” of what’s possible.

1 Like

Would this long-ago discussion be applicable, or does it not apply where shortcodes are concerned?

Yes, That’s the way it’s done.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.