MDX Posts Are Now Supported
August 25, 2026
- Markdown
This post is a .mdx file instead of .md. Everything from the other
posts still works — headings, lists, and syntax-highlighted code blocks —
but MDX also lets a post render actual React components inline.
This box isn't a styled blockquote — it's a real Callout component, rendered
directly inside the content.
Code still works the same way
function greet(name) {
return `Hello, ${name}!`;
}
console.log(greet('world'));Mixing prose and components
Only .mdx files can import and render components like this — existing .md
posts are untouched and keep rendering through the original Markdown pipeline.
That's the whole trick: same frontmatter, same syntax highlighting, same styling — just with the option to drop in a component when plain Markdown isn't expressive enough.
More components
A handful of Starlight-inspired components are also available.
Tabs
npm install nextSteps
- Install dependencies with your package manager of choice.
- Run
next devto start the local server. - Open
localhost:4000in your browser.
LinkButton
Back to all posts
Next.js docs
FileTree
- app/
- blog/
- [slug]/
- page.tsx
- [slug]/
- layout.tsx
- page.tsx
- blog/
- content/
- posts/
- mdx-in-this-blog.mdx
- posts/
- package.json
Charts
| Label | Visitors | Signups |
|---|---|---|
| Jan | 1200 | 320 |
| Feb | 1900 | 480 |
| Mar | 1500 | 410 |
| Apr | 2400 | 610 |
| May | 2100 | 590 |
| Label | Requests |
|---|---|
| Mon | 820 |
| Tue | 932 |
| Wed | 901 |
| Thu | 1340 |
| Fri | 1290 |
| Sat | 780 |
| Sun | 690 |
Cards and LinkCards
Fast
Posts are statically generated at build time.
Flexible
Drop React components straight into .mdx posts.