CodeGroup keeps related blocks together.
Code blocks
Fence code with three backticks and name the language for syntax highlighting:

How it looks on your site
- Highlighting covers every language Shiki knows, like
bash,json,tsx,python,go,rust,sqlandyaml. - Code blocks in the post get a copy button and the language name in the corner when a reader hovers over them.
- Long lines scroll sideways in
.mdxfiles and wrap in.mdfiles. - Inline code uses single backticks, like
`blog.json`.
```js title.js), line highlighting or line numbers yet, and ignores the text after the language.
Syntax theme
styling.codeblocks in blog.json sets the colors:
blog.json
The setting applies to
.mdx files, while code blocks in .md files keep GitHub’s light and dark colors and "dark" only darkens their background.
CodeGroup
CodeGroup keeps several related code blocks together with even spacing:
Styling
Code blocks in posts carry the classcode-block, their copy button carries code-block-copy-button and groups carry code-group.
style.css