Publish with Cloudflare Pages
This documentation is a VitePress static site and can be deployed with Cloudflare Pages.
Connect the project
- Push this repository to a Git provider supported by Cloudflare Pages.
- In the Cloudflare dashboard, create a Pages project and connect the repository.
- Set the Root directory to
docs. - Set the Build command to
npm run build. - Set the Build output directory to
.vitepress/dist. - Deploy the project.
Cloudflare Pages installs dependencies from docs/package-lock.json with npm ci. Commit that lockfile after running npm install in docs.
Build locally
From the docs directory:
sh
npm install
npm run devBuild and preview the production output before publishing:
sh
npm run build
npm run previewThe generated site is written to docs/.vitepress/dist; do not edit generated files directly.
Use a custom domain
After the first successful deployment, add the desired hostname under the Pages project's Custom domains settings and follow Cloudflare's DNS instructions. The current content links to the existing docs.modmail.dev installation guide; coordinate the hostname before replacing or redirecting the existing docs site.