Hello World — My First MDX Post
Welcome to my brand-new Astro + MDX project! This post is written in MDX, which means you get the best of both worlds: the simplicity of Markdown and the power of JSX components.
Why MDX?
MDX lets you seamlessly import and use React-style components right inside your Markdown content. Need a custom chart, an interactive widget, or a reusable UI element? Just drop it in.
Here’s a quick example of using a component inside MDX:
import Counter from '../../components/Counter.jsx';
<Counter client:load start={0} />What’s Next?
- Write your blog posts as
.mdxfiles insrc/pages/ - Create reusable components in
src/components/ - Style them with Tailwind, CSS Modules, or any approach you prefer
Tip: Any
.mdxfile placed undersrc/pages/automatically becomes a route in your Astro site.
Happy writing! ✨