MDX Example

This page demonstrates MDX support in Astro. You can write Markdown with JSX components!

What is MDX?

MDX lets you write JSX in your Markdown documents. This makes it perfect for:

Using Components in MDX

You can import and use Astro components directly in your MDX files:

import MyComponent from '../components/MyComponent.astro';

<MyComponent />

Features

  1. Markdown syntax - Write content naturally
  2. JSX support - Use React/Astro components
  3. Frontmatter - Add metadata to your pages
  4. TypeScript - Full type safety

Example Code Block

function greet(name) {
  return `Hello, ${name}!`;
}

This is a blockquote example showing how MDX handles standard Markdown features.