Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support theme configuration via theme.toml files #12265

Merged
merged 7 commits into from Apr 11, 2024

Conversation

AA-Turner
Copy link
Member

theme.conf and INI-styled theme configuration has served Sphinx well for several years.

However, the format suffers from under-specification and a lack of support for anything more than simple key-value pairs. This has led in recent history to adding support for lists of stylesheets or sidebar templates delimited by commas, which is not the most straightforwards.

This series of commits adds first-class support for theme configuration via theme.toml files, which are TOML-formatted documents.

theme.conf files remain supported. At some point in the future we may discuss deprecating support, but that seems some way off for now.

We also include an automatic conversion tool via python -m sphinx.theming conf_to_toml [THEME DIRECTORY], which writes a new theme.toml file to disk without modifying the existing theme.conf file.

A

@AA-Turner AA-Turner merged commit 72760ad into sphinx-doc:master Apr 11, 2024
22 checks passed
SmithChart added a commit to SmithChart/flamingo that referenced this pull request Apr 22, 2024
Since Sphinx 7.3.0 they use a new toml-based config format for the theme
configuration. See:
sphinx-doc/sphinx#12265

This breaks how the Flamingo Sphinx plugin handles the theme
configuration.

With this change we pin Sphinx to a version <7.3.0 to work around this
issue until we have a proper fix.

Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant