๐ Usageยถ
Install the packageยถ
The package is published on our internal PyPI server.
Add confirm-sphinx to the dependencies of your project, e.g. in your pyproject.toml:
[project.optional-dependencies]
docs = [
'confirm-sphinx',
]
Or install it manually:
pip install -i https://pypi.confirm.ch/ confirm-sphinx
Note
confirm-sphinx needs Python 3.12 or newer and Sphinx 9.1 or newer.
It pulls in Furo and all extensions enabled by the defaults, so you donโt have to install them yourself.
Use the extension (recommended)ยถ
Add the confirm.sphinx extension to your docs/conf.py and set the project name.
Thatโs the whole configuration:
project = 'My awesome project'
extensions = [
'confirm.sphinx',
]
The extension enables the theme and applies the defaults.
Whatever you set in your conf.py wins over the defaults, so you can override or extend any setting:
project = 'My awesome project'
author = 'Someone else'
extensions = [
'confirm.sphinx',
'sphinxcontrib_django',
]
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
}
Use the theme onlyยถ
If you want the look, but not the defaults, only set the theme in your conf.py:
html_theme = 'confirm-sphinx'
Sphinx finds the theme through the sphinx.html_themes entry point, so you donโt need to add anything to extensions.
In this mode, none of the defaults or extensions are applied.
See ๐จ Theme for the available options.
Upgrade from confirm.sphinx.defaultsยถ
Older versions shipped a confirm.sphinx.defaults module, which you imported with from confirm.sphinx.defaults import *.
That module is gone.
To upgrade your project:
Remove the
from confirm.sphinx.defaults import *line.Add
'confirm.sphinx'toextensions.Replace
extensions += [...]with a plainextensions = [...]list.Replace
html_theme_options.update({...})with a plainhtml_theme_options = {...}dictionary.