Skip to content

FAQ

How do I add a new document?

  1. Create a .md file in the docs directory;
  2. Register the page path in the sidebar of docs/.vitepress/config.mjs;
  3. Refresh the browser to see the new page.

See Getting Started.

How do I change the site title and theme color?

  • Title: modify title in docs/.vitepress/config.mjs;
  • Theme color: modify the --vp-c-brand-* variables in docs/.vitepress/theme/custom.css.

The search configuration is in the themeConfig.search field of docs/.vitepress/config.mjs. Set provider: 'local' to enable local search; remove the field to disable it.

Does the documentation support dark mode?

Yes. The site follows the system appearance by default, and you can also toggle it manually with the button in the top-right corner; no extra configuration is needed.

How do I deploy to my own server?

Host the docs/.vitepress/dist directory produced by npm run docs:build on any static server (Nginx, object storage, etc.). See Deployment.

How do I add multi-version switching to the docs?

The official VitePress approach for versioning is multiple static builds plus custom navigation; you can also integrate community plugins (e.g. vitepress-versioning) quickly.

What should I do when the build fails?

Common troubleshooting steps:

  1. Check whether the Node version is 18 or above: node -v;
  2. Rebuild after clearing the cache: rm -rf docs/.vitepress/cache docs/.vitepress/dist;
  3. Reinstall dependencies: rm -rf node_modules && npm install;
  4. Look at the full error stack to locate the specific file.

Modify the message and copyright fields of themeConfig.footer in docs/.vitepress/config.mjs.


Didn't find an answer?

Built with VitePress · Knowledge shared openly