Share a MkDocs site privately
mkdocs build takes twenty seconds and produces site/. Then comes the
part that takes a week: deciding where it goes. Pages means a public
repo or a paid plan; a bucket means a bucket policy; the internal
Kubernetes ingress means a ticket.
For a draft, an internal handbook, or a runbook one customer should see, none of that is the point. You want a link with a fence around it.
Publish the build
# mkdocs.yml
use_directory_urls: false
mkdocs build # → site/
use_directory_urls: false is the flag that matters here. By default
MkDocs writes page/index.html and links to page/, which only
resolves if a server is doing directory-index lookups for you. With it
off you get page.html and links that point at real files — the same
change that makes a build browsable offline.
Then drag site/ (or a zip of it) into
the app:
index.htmlbecomes the report body.- The theme's CSS and JS, the search index, and every built page upload alongside, with relative references rewritten to the uploaded copies.
- Search works, because the index is fetched from the same origin rather
than from
file://— background in why the report lost its CSS.