Merge #19910 - Switch the theme used when building our HTML documents

Pull-request: #19910
Fixes: #19909
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2026-01-17 14:19:47 +01:00
commit 72287e2ebf
No known key found for this signature in database
GPG Key ID: 70684F4717D49A31

View File

@ -100,15 +100,11 @@ pygments_style = 'sphinx'
# a list of builtin themes.
html_theme = 'default'
# See: https://docs.readthedocs.io/en/stable/reference/environment-variables.html#envvar-READTHEDOCS
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if on_rtd: # only import and set the theme if we're building docs on readthedocs
try:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
except:
html_theme = 'default'
try:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
except:
print('WARNING: The python module sphinx_rtd_theme was not found, using the default theme. Debian package: python3-sphinx-rtd-theme')
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the