Markdown Features in Astro
by Astro Theme Switcher
markdown astro mdx
Astro supports rich Markdown features out of the box, and with MDX enabled, you can even use React components!
Standard Markdown
You can use all standard Markdown syntax:
Headings
Use # for headings of different levels.
Lists
- Unordered lists
- With multiple items
- And nested items
- Like this one
- Ordered lists
- Are also supported
- With numbers
Code Blocks
You can include code blocks with syntax highlighting:
function greet(name) {
return `Hello, ${name}!`;
}
Links and Images
- Links work as expected
- Images can be included:
Blockquotes
This is a blockquote. Use it for quotes, callouts, or important notes.
MDX Features
Since MDX is enabled, you can use React components directly in your Markdown:
import { MyComponent } from '../components/MyComponent.astro';
<MyComponent />
This makes your blog posts incredibly flexible and powerful!
Typography
The Tailwind Typography plugin provides beautiful default styles for all Markdown content, making your posts look great without additional styling.