Markdown Features
VitePress provides enhanced markdown features for creating rich documentation.
Basic Formatting
Bold text and italic text and bold italic.
Strikethrough text
Inline code
Headings
H1 Heading
H2 Heading
H3 Heading
H4 Heading
H5 Heading
H6 Heading
Lists
Unordered List
- Item 1
- Item 2
- Nested item 2.1
- Nested item 2.2
- Item 3
Ordered List
- First item
- Second item
- Third item
- Nested item 3.1
- Nested item 3.2
Task List
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task
Links
Images
Blockquotes
This is a blockquote.
It can span multiple lines.
Note: You can use markdown inside blockquotes.
Code Blocks
Basic Code Block
Plain text code blockSyntax Highlighting
javascript
function greet(name) {
console.log(`Hello, ${name}!`)
}
greet("World")python
def greet(name):
print(f"Hello, {name}!")
greet("World")typescript
interface User {
name: string
age: number
}
const user: User = {
name: "Alice",
age: 30
}Line Highlighting
javascript
function example() {
const highlighted = true // This line is highlighted
const normal = false
// These lines
// are also
// highlighted
}Line Numbers
typescript
function fibonacci(n: number): number {
if (n <= 1) return n
return fibonacci(n - 1) + fibonacci(n - 2)
}Tables
| Feature | Supported | Notes |
|---|---|---|
| Markdown | ✅ | Full support |
| Code highlighting | ✅ | Multiple languages |
| Custom containers | ✅ | Info, tip, warning, danger |
| Math equations | ✅ | Via plugin |
Horizontal Rule
Emoji
🎉 🚀 ✨ 👍
Footnotes
Here's a sentence with a footnote[^1].
[^1]: This is the footnote content.
Custom Containers
INFO
This is an info box.
TIP
This is a tip.
WARNING
This is a warning.
DANGER
This is a dangerous warning.
Click to expand
This is a details block with hidden content.
HTML in Markdown
You can use HTML tags in markdown:
This text is blue and bold.
Escaping
Use backslash to escape special characters:
*Not italic*
`Not code`
Next Steps
Learn about VitePress-specific features.