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:
commit
72287e2ebf
14
docs/conf.py
14
docs/conf.py
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user