Cloudflare Pages Deployment¶
This project is intended to be previewed locally with MkDocs and deployed as a static site through Cloudflare Pages.
Local Build¶
MkDocs outputs the static site to:
Cloudflare Pages Settings¶
Recommended settings:
| Setting | Value |
|---|---|
| Framework preset | None or MkDocs |
| Build command | mkdocs build |
| Build output directory | site |
| Root directory | / |
| Production branch | main or selected docs branch |
Python Dependencies¶
Keep dependencies in:
Typical content:
Private Repository Workflow¶
A suitable workflow is:
local edit
↓
mkdocs serve
↓
commit and push to private GitHub repo
↓
Cloudflare Pages build
↓
static documentation site
Common Checks¶
Before pushing:
After deployment:
- open the Cloudflare Pages URL
- check navigation
- test search
- verify custom CSS and JavaScript are loaded
- verify font scaling still works
Common Issues¶
Missing dependency¶
If Cloudflare build fails because MkDocs or the Material theme is missing, check requirements.txt.
Wrong output directory¶
Cloudflare Pages must publish the site directory, not docs.
Navigation path error¶
Run locally:
This usually catches broken nav paths before deployment.