WindowsmacOSLinux

Where Does Sphinx Store Config and Build Output?

Sphinx conf.py, source RST files and _build output layout on Windows, macOS and Linux.

Last updated

Sphinx keeps config in conf.py inside the source dir. RST or Markdown sources sit beside it, and HTML lands in _build by default.

Virtualenvs and extensions live outside the docs folder. The docs themselves stay portable. Copy the source dir and you have everything that matters. Output rebuilds from scratch.

Where Sphinx stores this, by platform

Windows
[DocsDir]\conf.py

Config beside index.rst. Output defaults to [DocsDir]\_build\html\. Delete _build to fix stale pages. Keep conf.py and sources in git; ignore _build.

macOS
[DocsDir]/conf.py

Same layout. Python env (venv, conda) sits elsewhere; docs folder stays self contained. Exact build dir may vary if Makefile overrides BUILDDIR.

Linux
[DocsDir]/conf.py

Same arrangement. CI typically runs sphinx-build -b html source _build/html. Exclude _build from version control. Check Makefile if output lands elsewhere.

Frequently asked questions

Where is Sphinx HTML output?

In _build/html under your docs dir after a build. That folder is disposable. Source RST, conf.py and static assets are the files to back up.

My Sphinx build shows old content. What do I delete?

Delete the _build folder and rebuild. Cached doctrees go stale in confusing ways. Sphinx recreates output cleanly on the next run.

Notice an outdated path? Let us know.