Architecture¶
The build pipeline is intentionally split into small filesystem-oriented
modules. The high-level orchestration lives in
thornforge.buildsite.build_site.
Build flow¶
Materialize the source repository. Local paths are used directly; supported GitHub URLs are cloned into a temporary directory.
Discover the repository profile: docs directory, project name, project pages, version fallback, Git capability, and hash input paths.
Choose build versions from
v*Git tags, or fall back to one current-tree build.Copy or archive each version into a temporary worktree.
Patch the Sphinx
conf.pywith ThornForge’s version-switcher sidebar configuration.Run
python -m sphinx -b html.Copy shared assets and inject navigation/runtime references into generated HTML.
Write public version symlinks,
latest, JSON manifests, project pages, and inline runtime payloads.
Module boundaries¶
thornforge.buildsite.repositoryDiscovers source repository structure and metadata.
thornforge.buildsite.gitWraps Git commands, source materialization, and content hashing.
thornforge.buildsite.builderRuns Sphinx and post-processes documentation build outputs.
thornforge.buildsite.siteWrites generated site pages, docs helper files, and runtime JSON payloads.
thornforge.buildsite.info_sitePublishes optional
info/content into the root of the generated site.thornforge.buildsite.navNormalizes HTML fragments and injects shared navigation placeholders, CSS, and JavaScript references.