Markdown Extension Examples
This page demonstrates some of the built-in markdown extensions provided by VitePress.
1、插入表格
<CsvTable src="/vueb2331homework1.csv" />
(放在public下,用绝对路径)
2、提供下载链接(pdf、ppt、html)包括展示
[课件](/downloads/web/webvuejs.pdf)
<embed src="/downloads/web/webvuejs.pdf" width="100%" height="600px" /> (页面展示)
<p> <a href="/downloads/web/webcourse.pdf" target="_blank"> 📄 点击下载 PPT 课件 (新窗口) </a> </p> (在新页面打开用法)(ppt可以下载)
<p> <a href="/downloads/web/components.zip" target="_blank"> 📄 点击下载 zip 资源 (新窗口) </a> </p>
3、markdown的Frontmatter 区域,对整个文章进行控制。
---
# 默认布局就是 doc,所以不用特意写 layout: doc
sidebar: false # 关闭左侧:文档目录栏
aside: false # 关闭右侧:文章大纲栏 (On this page)
comment: false # 关闭我们刚才做的评论功能
---
# 关于我
这里是正文内容...Syntax Highlighting
VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:
Input
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```Output
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}Custom Containers
Input
::: 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.