ct-build-docs¶
Build the compiletools documentation site locally.¶
- Author:
- Date:
2026-05-04
- Version:
10.0.6
- Manual section:
1
- Manual group:
developers
SYNOPSIS¶
ct-build-docs [–help]
DESCRIPTION¶
ct-build-docs is a thin wrapper around sphinx-build that builds the
compiletools documentation site from the project’s RST sources. The site
is the same one served at https://drgeoff.github.io/compiletools/ – see
.github/workflows/docs.yml for the deploy pipeline that runs on every
vX.Y.Z tag push.
The build sources are:
README.rst– project landing pagesrc/compiletools/README.ct-*.rst– one page per ct-* toolREADME.coders– contributor guide
Output is written to docs/_build/html/. Per-tool stub .rst files
are auto-generated into docs/_generated/. Both directories are
gitignored.
The build runs with -W (warnings are errors), so dead cross-references
or RST syntax errors fail the build immediately.
WHY docs/ EARNS ITS KEEP¶
The actual content lives in the per-tool README.ct-*.rst files in
src/compiletools/ and the root README.rst. Those READMEs are
flat – no cross-links, no search, no theme, no auto-generated tool
index. docs/ is the small Sphinx glue (conf.py, index.rst,
tools.rst, contributing.rst) that turns them into a navigable
HTML site. Specifically:
docs/conf.py– Sphinx project config; pulls name/version/authors frompyproject.toml(no duplication); registers asetup()hook that scanssrc/compiletools/README.ct-*.rstand writes one stub.rstper tool intodocs/_generated/so newly-added tools appear in the site automatically without manual toctree edits.docs/index.rst– landing page;.. include::of rootREADME.rstplus a hidden toctree linking the other pages.docs/tools.rst–:glob:toctree wrapper that pulls in every_generated/ct-*stub.docs/contributing.rst–literalincludeofREADME.coders(which uses shell-style comments, not RST) so it can still appear in the site without breaking the RST parser.
The directory pulls double duty:
Published-site source – the deploy pipeline at
.github/workflows/docs.ymlbuilds from here and pushes todrgeoff.github.io/compiletools/on everyvX.Y.Ztag.RST validity gate –
src/compiletools/test_docs_build.pyruns the same-Wbuild under pytest so malformed RST in anyREADME.ct-*.rst(broken cross-reference, malformed table, duplicate label, unknown directive) fails CI on every PR rather than silently rotting until release.
Even if no human ever browsed the published site, the validator role
alone justifies keeping the docs/ glue.
REQUIREMENTS¶
The [docs] optional-dependency group must be installed:
uv pip install -e ".[docs]"
This pulls in sphinx, furo, and sphinx-copybutton.
USAGE¶
scripts/ct-build-docs
After a successful build, open docs/_build/html/index.html in a
browser.
SEE ALSO¶
ct-release (1) – tag a new release; tag pushes trigger the docs deploy
sphinx-build (1)