# npm i -g pnpm 这条命令安装以后,pnpm一直安装有问题
npm i pnpm -g
pnpm i
# dev en-US docs
pnpm dev
# dev zh-CN docs
pnpm dev:zh
# 阿里云主机并暴露5173端口供web访问
pnpm dev:zh --host 172.25.16.119
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
# build en-US docs
pnpm build
# build zh-CN docs
pnpm build:zh
This comm
7084
and generates static content into the build
directory and can be served using any static contents hosting service.
Recommended to read the following part before you start to contribute the docs.
- Chinese docs is under
/docs-zh
- VitePress Markdown features VitePress Markdown
- When you add new file to the docs, please add config of sidebar menu in
/docs/vitepress/config/sidebar.ts
- We have enabled AutoCorrect to improve copywriting, correct spaces, words, punctuations between CJK. If your PR encounter this kind of problems, please check your PR's check result and fix them.
This feature will be offfical supported in the future. as a workaround, you can use the following syntax:
<custom-title title="index.ts">
Your codeblock
</custom-title>
If you want to write a blog, the following things you need to do
- Add new post under
docs/blog
ordocs-zh/blog
then just wirte the Markdown file. - Add new item to
/docs/.vitepress/config/sidebar.ts
or/docs-zh/.vitepress/config/sidebar.ts
/blog/
.