Skip to main content

Writing Blog Posts with MDX

ยท One min read
Abdul Khan
Maintainer of Dev Dino Mountain

Blog posts on this site support MDX โ€” meaning you can embed React components directly inside Markdown. This post is a quick demo of what's possible.

tip

MDX is just Markdown + JSX. If you know Markdown, you already know 90% of it.

Interactive Elementsโ€‹

You can drop React components inline. Here's a live example:

<button onClick={() => alert("T-Rex approved! ๐Ÿฆ•")}>
Click me!
</button>

When to Use MDX vs MDโ€‹

Use .md for: resource pages, guides, anything that's just content.

Use .mdx for: blog posts or pages where you want interactive demos, embedded components, or conditional rendering.

Further Readingโ€‹