Writing Guide: Markdown / MDX
Supported Markdown extensions, KaTeX math, Shiki code features, and when to use MDX.
views
| comments
1. Markdown Features#
Enabled by default:
- GFM: tables, strikethrough, task lists
- Math: KaTeX (
$...$/$$...$$) - Code highlighting: Shiki (titles, diff/highlight notations)
2. Math (KaTeX)#
Inline:
Euler: $e^{i\\pi}+1=0$mdBlock:
$$
\\int_0^1 x^2 dx = \\frac{1}{3}
$$md3. Code Notations (diff / highlight)#
Diff-like markers (powered by the theme’s Shiki transformers):
const a = 1
const a = 2tsHighlight:
const token = 'secret'ts4. When to Use MDX#
Use .mdx when you want to import and render components inside content (e.g. Aside, Tabs, GithubCard).
See the “MDX Components” doc for examples.