Writing posts in MDX
Published on 2026-07-02
Posts can now be authored in MDX too, not just experiments. That means
a blog post can embed a live, interactive component right in the middle of
the prose — something the plain react-markdown post renderer could never do:
The count is: 5
The rest of the post is normal Markdown, so existing writing habits carry over — lists, quotes, and fenced code with highlighting all still work:
export const greeting = 'hello from an MDX post'
Note:
.mdxtreats inline HTML as JSX, so if a post needs raw<details>or<iframe>markup it must be JSX-valid (closed tags,className, …). Posts that rely on loose HTML can stay as.mdand keep rendering throughreact-markdown.