| 1 |
# Python Docs Sphinx Theme |
| 2 |
|
| 3 |
This is the theme for the Python documentation. |
| 4 |
It requires Python 3.12 or newer and Sphinx 7.3 or newer. |
| 5 |
|
| 6 |
Note that when adopting this theme, you're also borrowing an element of the |
| 7 |
trust and credibility established by the CPython core developers over the |
| 8 |
years. That's fine, and you're welcome to do so for other Python community |
| 9 |
projects if you so choose, but please keep in mind that in doing so you're also |
| 10 |
choosing to accept some of the responsibility for maintaining that collective |
| 11 |
trust. |
| 12 |
|
| 13 |
To use the theme, install it into your docs build environment via `pip` |
| 14 |
(preferably in a virtual environment). |
| 15 |
|
| 16 |
|
| 17 |
## Configuration options |
| 18 |
|
| 19 |
To use this theme, add the following to `conf.py`: |
| 20 |
|
| 21 |
- `html_theme = 'python_docs_theme'` |
| 22 |
|
| 23 |
- `html_sidebars`, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars |
| 24 |
|
| 25 |
|
| 26 |
## Translation |
| 27 |
|
| 28 |
This theme supports localization. For more information see the [Python Developer's |
| 29 |
Guide](https://devguide.python.org/documentation/translations/translating/#how-do-i-translate-the-python-docs-sphinx-theme). |
| 30 |
|
| 31 |
|
| 32 |
## Preview |
| 33 |
|
| 34 |
See a demo of the CPython docs using this theme: |
| 35 |
|
| 36 |
- https://python-docs-theme-previews.readthedocs.io |
| 37 |
|
| 38 |
The kitchen sink is a showcase of every Sphinx feature: |
| 39 |
|
| 40 |
- https://sphinx-themes.org/sample-sites/python-docs-theme/kitchen-sink/ |