My default Sphinx Docs based builder.
- Nix 100%
| .forgejo/workflows | ci: Echo target image tags during push | |
| docs/decisions | docs: ADR-0001 Include sphinx-markdown-builder | |
| .gitlab-ci.yml | fix: Create /var/tmp | |
| action.yml | docs: Update action reference to v0.12.0 | |
| default.nix | feat: Add parameter "system" into default.nix | |
| flake.lock | feat: Add sphinxcontrib-mermaid for diagram support | |
| flake.nix | feat: Add blockdiag font support via BLOCKDIAG_FONTPATH | |
| LICENSE | Add MIT license | |
| packages.nix | feat: Add sphinx-markdown-builder to Sphinx environment | |
| README.md | docs: Update README with build instructions and references | |
| renovate.json | ci: Add renovate configuration | |
Sphinx Builder
A container image that bundles Sphinx, common extensions, and build tooling so teams can produce identical documentation builds locally and in CI.
Status - Stable
I am using this for most of my repositories which build Sphinx based documentation.
Usage as Forgejo Action
Use this repository as a Forgejo Action to build Sphinx documentation in CI:
steps:- uses:actions/checkout@v4- uses:johbo/sphinx-builder@v0.12.0Inputs
| Input | Default | Description |
|---|---|---|
docs-dir |
docs |
Directory containing the Sphinx docs (relative to repo root) |
target |
html |
Sphinx build target (e.g. html, latexpdf) |
Example with non-default values:
- uses:johbo/sphinx-builder@v0.12.0with:docs-dir:documentationtarget:latexpdfUsage with Nix
Start a shell with the packages from this repo using nix shell:
nix shell git+https://codeberg.org/johbo/sphinx-builder.git
Building the Container Image
The container image is built on Codeberg via Forgejo Actions. Trigger a build manually via workflow dispatch in the Actions tab.
Related Projects
- Sphinx - Documentation generator
- MyST Parser - Markdown support for Sphinx
- Default repository template - Repository template with Sphinx docs setup