Markdown is a great invention that lets us write less markup. It also handles typographical matters like converting straight apostrophes ( ' ) to opening or closing quotes ( ' or ' ) for us.
Although Astro has built-in support for Markdown via .md files, I’d argue that your Markdown experience can be enhanced in two ways:
MDX
Markdown Component
I’ve cover these in depth in Practical Astro: Content Systems .
We’re going to focus on MDX today.
MDX
MDX is a superset of Markdown. It lets you use components in Markdown and simple JSX in addition to all other Markdown features.
For Astro, you can also use components from any frontend framework that you have installed. So you can do something like:
--- # Frontmatter... ---
import AstroComp from '@/components/AstroComp.astro' import SvelteComp from '@/components/AstroComp.astro'
<AstroComp> ... </AstroComp> <SvelteComp> ...…