前身是 vuepress
静态站点服务器 Static Site Generator (SSG)
字节
静态站点生成器
- 博客
- 文档
- 营销页面
- 档案
npm i vitepress -D- 创建项目
npx vitepress init三横杠必须写在头部 ---
写在路由对应的ma'rkdown
outline: deep prev: text: "上一页: 首页 1111ss" link: /markdown-examples next: text: "下一页: 首页 2222ss" link: /markdown-examples
config.mts中配置docFooter修改页脚
爬虫机器人会抓取这三个值
head:
-
- meta
- name: title content: "Runtime API Examples"
-
- meta
- name: description content: "Runtime API Examples"
必须配合git使用, git提交的这个时间, 它就会列为最后修改时间
// config.mts
lastUpdated: {
text: "最后更改时间",
formatOptions: {
dateStyle: "full",
timeStyle: "short",
},
},vitepress的markdown语法支持vue
- 打开仓库的 Settings
- 选择 pages
- 在 Branch 选项里 选择 main 分支, 然后选择/docs
- 点击 Save 保存
- 访问的地址 [github的名称].github.io/项目名称 https://cc-cgj.github.io/docs123
部署的目录只能选择根目录或者docs目录