Joe*_*e D 35 python documentation sidebar python-sphinx
我想知道是否有办法扩展文件中包含的标题下的所有子部分index.rst?
举个例子,它是这样的:
Section 1
Section 2
Section 3
Run Code Online (Sandbox Code Playgroud)
以下是我希望如何:
Section 1
Subsection 1.1
Subsection 1.2
Subsection 1.3
Section 2
Subsection 2.1
Subsection 2.2
Subsection 2.3
Section 3
Subsection 3.1
Subsection 3.2
Subsection 3.3
Run Code Online (Sandbox Code Playgroud)
如果我点击第1部分,它会显示下面的内容,但是如果我点击第2部分,则隐藏第1部分的内容,只显示2.我想在每次进入索引页面时扩展所有2个部分.我试过加toctree和maxdepth,没有什么作品.
Ste*_*tin 12
好吧,我失去了大约3.4M神经元试图读取斯芬克斯源代码(它是由一群拉比鲁莽的浣熊写的吗?!这么多级别的抽象).
所以:
fulltoc.html:
{{ toctree(collapse=False) }}
Run Code Online (Sandbox Code Playgroud)
(嘿,注意'崩溃'的论点?)
conf.py:
html_theme_path = [customized_readable_theme.get_html_theme_path()]
html_theme = 'customized_readable'
html_sidebars = {'**': ['fulltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']}
Run Code Online (Sandbox Code Playgroud)