Skip to content

Markdown Examples โ€‹

This page demonstrates the available markdown features and extensions in VitePress.

Typography & Formatting โ€‹

Headings โ€‹

H1 Heading โ€‹

H2 Heading โ€‹

H3 Heading โ€‹

H4 Heading โ€‹

H5 Heading โ€‹
H6 Heading โ€‹

Text Style โ€‹

Bold, Italic, Strikethrough, Inline Code.

Blockquotes โ€‹

This is a blockquote.

Multi-line blockquote with some bold text.

Horizontal Rule โ€‹


Lists โ€‹

Unordered โ€‹

  • Item 1
  • Item 2
    • Sub Item 2.1
    • Sub Item 2.2

Ordered โ€‹

  1. First
  2. Second
  3. Third

Task List โ€‹

  • [x] Completed task
  • [ ] Incomplete task

Tables โ€‹

SupportedStatusDescription
VitePressStableStatic Site Generator
VueStableJS Framework
MarkdownStandardMarkup Language
CategoryResource
A1
B1
A2
B2
B2
B3
A3
B3
B3
B3

Custom Containers โ€‹

INFO

Info
This is an info box. Used for general information.

TIP

Tip
This is a tip. Used for helpful advice or shortcuts.

WARNING

Warning
This is a warning. Used for important caveats.

DANGER

Danger
This is a dangerous warning. Used for critical errors or data loss warnings.

Click to expand

This is a details block (collapsible). Hidden content goes here.

Code Blocks โ€‹

Syntax Highlighting โ€‹

js
export default {
  data () {
    return {
      msg: 'Highlighted!'
    }
  }
}

Line Highlighting โ€‹

ts
// Highlight lines 1 and 4
export default {
  setup() {
    const count = ref(0)
    return { count }
  }
}

Line Numbers โ€‹

css
.my-class {
  color: red;
}

Colored Diffs โ€‹

ts
// [!code word:Hello]
const message = 'Hello World'
console.log(message) 

Code Groups โ€‹

bash
npm install
bash
pnpm install
bash
yarn install

Component Features โ€‹

Badges โ€‹

Use badges to highlight version numbers or status:

default^1.9.0betacaution

Vue Components in Markdown โ€‹

You can use Vue components directly in markdown:

Custom HTML/Vue container with 2 dynamic calculation

Advanced โ€‹

File Includes โ€‹

You can include content from other files (requires valid path):

Table of Contents โ€‹

Emoji โ€‹

๐ŸŽ‰ ๐Ÿš€ ๐Ÿ“ โš ๏ธ


Check out the official documentation for more.