Code Block
Adding code blocks to your docs
Display code blocks, required by default.
- Syntax highlighting powered by Shikiji
- Copy button
- Custom Titles
You can add this component to mdxComponents
.
You spectify highlighted lines by adding a numbric range.
You can highlight a specific word by wrapping the word in /
.
Add title="x"
to the codeblock meta.
Inline code is supported too, console.log("Hello World")
.