Markdown & MDX
Text formatting
Section titled “Text formatting”**bold** _italic_ ~~strikethrough~~`inline code` [link text](url) Headings
Section titled “Headings”# H1## H2### H3- unordered item- another item - nested item
1. ordered item2. another itemCode blocks
Section titled “Code blocks”```bashnpm install```
```typescriptconst x: number = 42;```Tables
Section titled “Tables”| Column A | Column B | Column C ||----------|----------|----------|| value | value | value |Blockquotes & callouts
Section titled “Blockquotes & callouts”> This is a blockquote.> It can span multiple lines.In Starlight (MDX), use the <Aside> component for styled callouts:
import { Aside } from '@astrojs/starlight/components';
<Aside type="note">This is a note.</Aside><Aside type="tip">This is a tip.</Aside><Aside type="caution">Watch out.</Aside><Aside type="danger">Danger ahead.</Aside>Frontmatter (YAML)
Section titled “Frontmatter (YAML)”---title: Page Titledescription: One-sentence description for SEO and previews.tags: [tag1, tag2]---MDX — using components
Section titled “MDX — using components”MDX lets you use JSX components inside Markdown. Import at the top of the file:
import { Card } from '@astrojs/starlight/components';
Regular markdown here.
<Card title="Card Title"> Content inside the card.</Card>Line breaks & horizontal rules
Section titled “Line breaks & horizontal rules”Two spaces at end of lineforces a line break.
--- ← horizontal rule