MDX Full Example
This is a paragraph with bold, italic, ~~strikethrough~~, and inline code.
Here is a link.
Headings
H3 Heading
H4 Heading
H5 Heading
H6 Heading
Lists
Unordered list
- Item one
- Item two
- Nested item
- Another nested item
- Item three
Ordered list
- First
- Second
- Third
Task list
- [x] Done task
- [ ] Not done task
Blockquote
This is a blockquote It can span multiple lines
Code Blocks
JavaScript
function add(a, b) {
return a + b;
}
Python
def add(a, b):
return a + b
Bash
npm install
npm run dev
Code Blocks with Titles
def greet(name):
return f"Hello, {name}!"
Tables
| Name | Role | Age | | ----- | ------ | --- | | Alice | Admin | 30 | | Bob | User | 25 | | Carol | Editor | 28 |
Images
Horizontal Rule
Inline HTML (allowed in MDX)
This is raw HTML inside MDX.
JSX Components (MDX power)
Props and Expressions
Current year: 2026
Math result: 4
Footnotes
This is a sentence with a footnote.[^1]
[^1]: This is the footnote text.
Emojis
Works like normal text 😄 🚀
Escaping characters
Use backslash to escape: not italic
not a heading
Collapsible (HTML)
Click to open
Hidden content goes here.
Final Section
This file is intentionally long and noisy.
If you understand this one file, you understand MDX.
End of post.