Skip to content

Markdown Extension Examples

更新: 8/21/2025     字数: 0 字     时长: 0 分钟

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

链接卡片测试

iconify

开源的图标库,提供了数以万计的矢量图标,支持多种框架和平台。它允许开发者轻松地在项目中使用各种图标,并且支持深浅模式切换。

代码块测试

sh
#默认有行号
pnpm -v
sh
#关闭行号
pnpm -v
sh
#查询pnpm版本
pnpm -v
sh
#查询yarn版本
yarn -v

链接统一性调试

https://default.link.com

https://weizwz.com

https://note.weizwz.com

https://vitepress.dev

https://hexo.io

https://git-scm.com

https://github.com

https://gitee.com

https://developer.mozilla.org

https://vite.dev

https://webpack.js

https://vuejs.org

https://twikoo.js.org

https://element-plus.org

https://nodejs.org

https://npmjs.com

https://react.dev

https://typescriptlang.org

https://uniapp.dcloud.net.cn

https://siliconflow.cn

https://www.deepseek.com

https://code.visualstudio.com

https://marketplace.visualstudio.com

https://www.google.com

https://chrome.google.com

https://mp.weixin.qq.com

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.

VenenoSix24 🩷 Ivyris Amaris