FAQ
How do I add a new document?
- Create a
.mdfile in thedocsdirectory; - Register the page path in the
sidebarofdocs/.vitepress/config.mjs; - Refresh the browser to see the new page.
See Getting Started.
How do I change the site title and theme color?
- Title: modify
titleindocs/.vitepress/config.mjs; - Theme color: modify the
--vp-c-brand-*variables indocs/.vitepress/theme/custom.css.
How do I enable or disable full-text search?
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:
- Check whether the Node version is 18 or above:
node -v; - Rebuild after clearing the cache:
rm -rf docs/.vitepress/cache docs/.vitepress/dist; - Reinstall dependencies:
rm -rf node_modules && npm install; - Look at the full error stack to locate the specific file.
How do I customize the footer?
Modify the message and copyright fields of themeConfig.footer in docs/.vitepress/config.mjs.
Didn't find an answer?
- Submit an Issue to report the problem;
- Contribute your answer by editing this page on GitHub.