Introduction
MDX is a powerful tool that lets you use JSX in your markdown content. This means you can import and use React components directly in your markdown files!
Why MDX?
- Component Integration - Use React components anywhere in your content
- Type Safety - Full TypeScript support
- Flexibility - Mix markdown with custom components
- Performance - Static generation with Next.js
Basic Syntax
Here's a simple example:
import { MyComponent } from "./components";
# Hello World
This is regular markdown content.
<MyComponent />
And we're back to markdown!Code Highlighting
The template includes beautiful code highlighting with copy-to-clipboard functionality:
const greeting = "Hello, MDX!";console.log(greeting);def greet(name): return f"Hello, {name}!"Next Steps
- Explore the
content/directory to see more examples - Add your own MDX files in any folder structure
- Customize the components in
components/posts/
Happy writing!