Hugo

How to write text " {{% shortcodes% }}“ so it will not rendering as shortcodes in markdown?

HI all,

Just want to write some notes on how to use shortcodes, and in what format will the shortcodes just display general content text “{{% shortcodes % }}” in markdown , not being parsed as shortcodes ?

thanks

Try

{{%/* shortcode */%}}
1 Like

I feel like the back-tick ` should do the trick. At least here it does?

{{% shortcode %}} - shows the shortcode. (In my markdown I have a tick in the beginning and the end.

If you want to go 100% sure why not create a shortcode that outputs a shortcode? like {{< shortcode name="shortcodename" enclosings="brackets" >}} that results in {{< shortcodename >}} being rendered. might be overkill but you could add extra styling, blinking and such :slight_smile:

That works fine in a non-Hugo context. But the comments are necessary when inside a Hugo content file.