This website is built using VitePress, Vite & Vue Powered Static Site Generator.
The site is a single VitePress project with built-in i18n:
- English docs live under
docs/and are served at the site root (/). - Simplified Chinese docs live under
docs/zh/and are served at/zh/. - Both locales share one config at
docs/.vitepress/config.ts.
npm i -g pnpm
pnpm i# dev the site (English at /, Chinese at /zh/)
pnpm devThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
# build both locales
pnpm buildThis command generates static content into docs/.vitepress/dist and can be served using any static contents hosting service.
Preview the production build locally:
pnpm previewThe repository deploys to GitHub Pages via .github/workflows/deploy.yml on every push to main. The workflow builds with BASE=/envd-docs/ so the site is served from https://<org>.github.io/envd-docs/.
To override the deployment URL or base path (e.g. when using a custom domain), set the SITE_URL / BASE environment variables in the workflow, or pass them to a local build:
BASE=/my-prefix/ SITE_URL=https://example.com/ pnpm buildRemember to select GitHub Actions as the source in the repository's Settings → Pages.
Recommended to read the following part before you start to contribute the docs.
- Chinese docs is under
/docs/zh, and its sidebar configs are the*.zh.tsfiles under/docs/.vitepress/config/sidebar/ - 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(English) ordocs/zh/blog(Chinese) then just write the Markdown file. - Add new item to
/docs/.vitepress/config/sidebar/blog.ts(English) or/docs/.vitepress/config/sidebar/blog.zh.ts(Chinese).