mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 将文档首页从传统 Markdown 格式迁移到 VitePress 首页配置 - 添加 VitePress 主题配置文件和自定义样式 - 配置 Git 忽略文件以排除构建产物和依赖 - 添加 VitePress 构建缓存和依赖预构建文件 - 创建 API 示例页面和导航配置 - 移除旧的 TOC 配置文件并替换为新的路由结构
87 lines
1.0 KiB
Markdown
87 lines
1.0 KiB
Markdown
# Markdown Extension Examples
|
|
|
|
This page demonstrates some of the built-in markdown extensions provided by VitePress.
|
|
|
|
## Syntax Highlighting
|
|
|
|
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features
|
|
like line-highlighting:
|
|
|
|
**Input**
|
|
|
|
````md
|
|
```js{4}
|
|
export default {
|
|
data () {
|
|
return {
|
|
msg: 'Highlighted!'
|
|
}
|
|
}
|
|
}
|
|
```
|
|
````
|
|
|
|
**Output**
|
|
|
|
```js{4}
|
|
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](https://vitepress.dev/guide/markdown).
|