Chapter 1
mdBook Hosting Note — Refined
1. Core Technical Model
mdBook turns Markdown source files into a complete static website.
Markdown source files
↓
mdbook build
↓
generated book/ directory
↓
static hosting
The website is generated before deployment. It is not rendered dynamically for every visitor.
The final book/ directory contains the deployable website:
book/
├── index.html
├── chapter pages
├── searchindex.js
├── css/
├── fonts/
└── assets/
Each chapter is served as a normal HTML page.
2. Hosting Model
Because mdBook outputs static files, the website does not need:
backend server
database
SSR framework
Node runtime
user authentication
API layer
The hosting platform only needs to serve the generated book/ folder.
3. Hosting Options
Only these two options are being considered:
1. Cloudflare Pages
2. Vercel
Both work because both can host static websites.
4. Cloudflare Pages
Cloudflare Pages is the preferred option for the mdBook site.
For non-technical understanding:
Cloudflare Pages stores the finished website files and serves
them quickly to readers through its global network.
For developers:
Project type: static site
Build output: book/
Runtime server: not required
SSR: not required
Backend: not required
CDN delivery: yes
Custom domain: supported
Git-based deployment: supported
Use Cloudflare Pages if the book remains mostly static content: chapters, resources, updates, and downloadable files.
5. Vercel
Vercel is also valid, but it should be treated as static hosting here.
For non-technical understanding:
Vercel can publish the finished mdBook website online
even though the project is not a Next.js app.
For developers:
Framework type: static / other
Build output: book/
Runtime server: not required
SSR: not required
Backend: not required
Custom domain: supported
Git-based deployment: supported
Use Vercel if the broader project may later include Vercel-hosted frontend products. For the mdBook itself, it does not provide a major advantage over Cloudflare Pages.
6. Final Hosting Preference
Recommended order:
1. Cloudflare Pages
2. Vercel
Cloudflare Pages fits the static nature of mdBook more directly. Vercel remains a good fallback or ecosystem choice.
7. Practical Final Stack
mdBook
GitHub repository
Cloudflare Pages or Vercel
custom domain
Google Search Console
optional analytics
downloadable PDF edition
Do not build a Next.js app for the book itself.
Keep the book static. Add dynamic infrastructure only if the project later needs accounts, saved progress, paid access, quizzes, dashboards, comments, or an admin panel.