0001. 安装 vitepress
1. 📒 基本流程
bash
# 安装 vitepress
$ pnpm add -D vitepress
# 完成初始化
$ pnpm vitepress init
# 按照提示完成初始化配置:
# ┌ Welcome to VitePress!
# │
# ◇ Where should VitePress initialize the config?
# │ ./docs
# │
# ◇ Site title:
# │ My Awesome Project
# │
# ◇ Site description:
# │ A VitePress Site
# │
# ◇ Theme:
# │ Default Theme
# │
# ◇ Use TypeScript for config and theme files?
# │ Yes
# │
# ◇ Add VitePress npm scripts to package.json?
# │ Yes
# │
# └ Done! Now run pnpm run docs:dev and start writing.
# 启动 vitepress
$ pnpm docs:dev
# 在浏览器中打开 Local 预览效果。
# vitepress v1.6.3
# ➜ Local: http://localhost:5173/
# ➜ Network: use --host to expose
# ➜ press h to show help
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37