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:
- Writing blog posts
- Creating documentation
- Building content-rich pages
Using Components in MDX
You can import and use Astro components directly in your MDX files:
import MyComponent from '../components/MyComponent.astro';
<MyComponent />Features
- Markdown syntax - Write content naturally
- JSX support - Use React/Astro components
- Frontmatter - Add metadata to your pages
- 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.
- List item one
- List item two
- List item three