Skip to content
山不让尘,川不辞盈
搜索 K
Main Navigation 主页闲聊关于
实用网页
工具插件

Appearance

Sidebar Navigation

pages

实用网页

工具插件

闲聊

关于我

2024

api examples

2023

markdown examples

On this page

Markdown Extension Examples ​

阅读时间:

1

分钟
文章字数:

138

字
发布日期:

2023-11-12

最近更新:

2024-11-19

markdown

This page demonstrates some of the built-in markdown extensions provided by VitePress.

测试图片放大 ​

test

Syntax Highlighting ​

VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:

Input

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

Output

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

Custom Containers ​

Input

md
::: info
This is an info box.
:::

::: tip
This is a tip.
:::

::: warning
This is a warning.
:::

::: danger
This is a dangerous warning.
:::

::: details
This is a details block.
:::

Output

INFO

This is an info box.

TIP

This is a tip.

WARNING

This is a warning.

DANGER

This is a dangerous warning.

Details

This is a details block.

More ​

Check out the documentation for the full list of markdown extensions.

Pager
Previous pageapi examples
本站总访问量 -- 次 本站访客数 -- 人次

前端狗都不如 © 2021-2024 holden