Doc

Codeblock

Codeblock Sugam Pokharel

The codeblock shortcode renders syntax-highlighted code with a toolbar and copy button. It has a ’lang’ field where you can enter the language that the code is in so that it will be highlighted according to its own syntax rules.

Shortcode Example

HTML
1
2
3
{{< codeblock lang="bash" >}}
npm run build
{{< /codeblock >}}

Actual Use

SHELL
1
npm run build

Share this article

  • X
  • Facebook
  • LinkedIn
  • Reddit
  • WhatsApp
  • Telegram
  • Pinterest
  • Bluesky