Skip to content

Commit e1e3de7

Browse files
committed
Add sphinx_rtd_theme to the list of extensions
This fixes left menu not being expanded when anchor used: readthedocs/sphinx_rtd_theme#1525 Also get rid of the old fallback and choose the theme explicitly.
1 parent 3ff2507 commit e1e3de7

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

docs/conf.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,6 @@
1515
import os
1616
import sys
1717

18-
try:
19-
# use bootstrap theme if user has it installed
20-
import sphinx_bootstrap_theme
21-
HTML_THEME = 'bootstrap'
22-
html_theme_path = [sphinx_bootstrap_theme.get_html_theme_path()]
23-
except ImportError:
24-
try:
25-
# fall back to sphinx_rtd_theme if available
26-
import sphinx_rtd_theme
27-
HTML_THEME = 'sphinx_rtd_theme'
28-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
29-
except ImportError:
30-
# and fall back to 'default' if neither of those are available
31-
HTML_THEME = 'default'
32-
3318
# If extensions (or modules to document with autodoc) are in another directory,
3419
# add these directories to sys.path here. If the directory is relative to the
3520
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -45,6 +30,7 @@
4530
# ones.
4631
extensions = [
4732
'sphinx.ext.autodoc',
33+
'sphinx_rtd_theme',
4834
]
4935

5036
# Add any paths that contain templates here, relative to this directory.
@@ -125,7 +111,7 @@
125111

126112
# The theme to use for HTML and HTML Help pages. See the documentation for
127113
# a list of builtin themes.
128-
html_theme = HTML_THEME
114+
html_theme = "sphinx_rtd_theme"
129115

130116
# 1.3.1 sphinx READTHEDOCS build compat
131117
# SEE:

0 commit comments

Comments
 (0)