Skip to content

Add static TOML configuration support with Sphinx.toml - #14718

Open
Shashankrawat1504 wants to merge 4 commits into
sphinx-doc:masterfrom
Shashankrawat1504:fix/9040-static-configuration
Open

Shashankrawat1504 wants to merge 4 commits into
sphinx-doc:masterfrom
Shashankrawat1504:fix/9040-static-configuration

Conversation

@Shashankrawat1504

@Shashankrawat1504 Shashankrawat1504 commented Oct 3, 2026 •

Copy link
Copy Markdown

Fixes #9040

What does this PR change?

Sphinx can now use Sphinx.toml as a static alternative to conf.py.

Adds support for loading configuration from Sphinx.toml using Python's standard tomllib.
Keeps conf.py for projects that require dynamic Python configuration.
conf.py and Sphinx.toml cannot be used together.
Applies the existing Sphinx configuration validation and CLI overrides to TOML values.
Supports extensions, paths, themes, and other standard Sphinx configuration options.
Provides clear errors for invalid TOML and configuration conflicts.
Adds tests covering parsing, validation, CLI behavior, paths, extensions, serialization, and parallel builds.
Updates the documentation with examples and TOML limitations.

Sphinx.toml is intended for projects that need declarative configuration without executing Python code.

@Shashankrawat1504 Shashankrawat1504 changed the title Add static Sphinx.toml configuration Add static TOML configuration support with Sphinx.toml Oct 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add static configuration (Sphinx.toml)

1 participant