Markdown 扩展例子
This page demonstrates some of the built-in markdown extensions provided by VitePress.
语法高亮
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!'
}
}
}自定义容器
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.