我有以下内容index.rst
file.
Know the cell population of your data
=====================================
Some content
.. toctree::
:maxdepth: 2
Installation
~~~~~~~~~~~~
.. toctree::
:maxdepth: 2
installation
Scripts
~~~~~~~
.. toctree::
:maxdepth: 2
scripts
API documentation
~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 2
apidoc
Roadmap
~~~~~~~
.. toctree::
:maxdepth: 2
roadmap
Indices and Tables
==================
* :ref: `genindex`
现在侧边栏看起来像这样:
正如该图片中所描述的那样。我想做几件事。
- 删除标题only在侧边栏中,但将其保留在主页中。
- 添加新的 URL 链接,但不会像“索引和表格”那样在主页中显示它
我怎样才能做到这一点?
我最终通过以下方式修复了它
在斯芬克斯的_模板目录创建文件
被称为foo.html
.
内容可能如下所示:
<hr />
<p>
<h2 class='logo'>
<a href="https://foo.bar.com/">Web Version</a>
</h2>
</p>
终于在conf.py添加这个:
html_sidebars = {
'**': [
'localtoc.html',
'relations.html',
'searchbox.html',
# located at _templates/
'foo.html',
]
}
最后看起来像这样:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)