There’s a note on this page saying that
code shortcodes should be used with triple backticks.
codeshortcodes, you must include triple back ticks and a language declaration. This was done by design so that the shortcode wrappers were easily added to legacy documentation and will be that much easier to remove if needed in future versions of the Hugo docs.
However the current practice seems to be using
code shortcode without the triple backticks, as can be seen here among many other places.
I also noticed that layouts/shortcodes/code.html adds
<pre><code> around the content enclosed within the shortcode, overriding the theme’s definition of
code shortcode -
here or here - which does not add
With these in mind, I’m wondering what’s the current recommendation regarding the use of backticks within the