nev*_*int 6 python restructuredtext python-sphinx
我有以下index.rst文件.
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`
Run Code Online (Sandbox Code Playgroud)
现在侧边栏看起来像这样:
如该图像中所述.我想做几件事.
我怎样才能做到这一点?
我终于通过以下方式修复了它
在Sphinx的_template目录中创建一个名为的文件foo.html.
内容可能如下所示:
<hr />
<p>
<h2 class='logo'>
<a href="https://foo.bar.com/">Web Version</a>
</h2>
</p>
Run Code Online (Sandbox Code Playgroud)
最后在conf.py中添加:
html_sidebars = {
'**': [
'localtoc.html',
'relations.html',
'searchbox.html',
# located at _templates/
'foo.html',
]
}
Run Code Online (Sandbox Code Playgroud)
最后它看起来像这样: