π How to Build and Launch Sphinx DocsΒΆ
Assuming youβre using Markdown + Sphinx + MyST, hereβs how to build your docs locally and preview them:
π οΈ Install DependenciesΒΆ
Create a docs/requirements.txt file:
sphinx
myst-parser
furo
Then install:
pip install -r docs/requirements.txt
π Folder Structure (minimal example)ΒΆ
docs/
βββ source/
β βββ index.md
β βββ installation.md
β βββ usage.md
β βββ stages.md
β βββ cli.md
β βββ architecture.md
β βββ conf.py
βββ build/
Your
index.mdshould include a{toctree}to organize the structure.
Example index.md:
# π Documentation
```{toctree}
:maxdepth: 2
:caption: Contents
installation
usage
stages
cli
architecture
api/modules
```
π§± Generate API Docs (Optional)ΒΆ
If you want to auto-generate doc pages from your Python modules:
sphinx-apidoc -o docs/source/api/ src/ # or your module folder
Then update index.md to include api/modules.
π¨ Build the DocsΒΆ
From the project root:
cd docs
make html
On Windows (no
make):
sphinx-build -b html source build
Then open:
docs/build/html/index.html