pnpm初始化
shell
$ mkdir blog
$ cd blog
$ pnpm init
初始化 vitepres
shell
$ pnpm add -D vitepress
$ pnpm vitepress init
将需要回答几个简单的问题:
T Welcome to VitePress!
|
o Where should VitePress initialize the config?
| ./
|
o Site title:
| blog
|
o Site description:
| A VitePress Site
|
o Theme:
| Default Theme
|
o Use TypeScript for config and theme files?
| No
|
o Add VitePress npm scripts to package.json?
| Yes
|
— Done! Now run pnpm run docs:dev and start writing.
启动
shell
$ pnpm docs:dev
打包
shell
$ pnpm docs:build
打包后的结果放在 .vitepress\dist
文件夹下