安装
前置准备
安装并初始化
npm i vitepress
$ npx vitepress init
将需要回答几个简单的问题:
┌ Welcome to VitePress!
│
◇ Where should VitePress initialize the config? //VitePress 应该在哪里初始化配置
│ ./docs
│
◇ Site title: //标题
│ My Awesome Project
│
◇ Site description: //描述
│ A VitePress Site
│
◆ Theme: //主题
│ ● Default Theme (Out of the box, good-looking docs)
│ ○ Default Theme + Customization
│ ○ Custom Theme
└
文档结构
tree
├─ docs
│ ├─ .vitepress
│ │ └─ config.js
│ ├─ api-examples.md
│ ├─ markdown-examples.md
│ └─ index.md
└─ package.json
├─ docs
│ ├─ .vitepress
│ │ └─ config.js
│ ├─ api-examples.md
│ ├─ markdown-examples.md
│ └─ index.md
└─ package.json