Skip to content

Commit adc6706

Browse files
ulysses4evermergify[bot]
authored andcommitted
docs: allow TOC items uncollapse without jump between pages
1 parent a155b07 commit adc6706

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

doc/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@
5757
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
5858
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
5959

60-
if not on_rtd: # only import and set the theme if we're building docs locally
60+
html_theme = 'sphinx_rtd_theme'
61+
# only import the theme if we're building docs locally
62+
if on_rtd:
63+
html_style = None
64+
using_rtd_theme = True
65+
else:
6166
import sphinx_rtd_theme
62-
html_theme = 'sphinx_rtd_theme'
6367
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
6468

6569
# The name for this set of Sphinx documents. If None, it defaults to
@@ -81,6 +85,9 @@
8185
"conf_py_path": "doc/",
8286
"source_suffix": '.rst',
8387
}
88+
html_theme_options = {
89+
'collapse_navigation': False,
90+
}
8491

8592

8693
# If true, an OpenSearch description file will be output, and all pages will

0 commit comments

Comments
 (0)