Sphinx - 如何维护页面之间的侧边栏内容?
Sphinx - How to maintain side bar content between pages?
我有这个源目录结构:
.
├── conf.py
├── devel
│ └── python
│ ├── Controles de flujo, condicionales y bucles.md
│ ├── Encapsulamiento.md
| ├── (...)
├── index.rst
├── _static
├── _templates
└── webdevel
这是我的 index.rst
:
¡Bienvenidos a Echemos un bitstazo!
======================================================
Este es mi espacio de documentación personal dónde almaceno todo tipo de conocimientos relacionados con la administración de sistemas y redes informáticas; desarrollo y otros temas varios de IT.
.. toctree::
:maxdepth: 1
:caption: Administración de sistemas
devel/python/python
Índice y tablas
==================
* :ref:`genindex`
* :ref:`search`
这是我的 python.rst
:
Python
======================================================
.. toctree::
:maxdepth: 1
:caption: Contenido:
:glob:
*
我的conf.py
:
project = 'Echemos un bitstazo ~ Wiki'
copyright = '2021, Álvaro Castillo'
author = 'Álvaro Castillo'
extensions = [ 'myst_parser'
]
templates_path = ['_templates']
language = 'es'
exclude_patterns = []
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
完成 sphinx-build -b html source build
之后,我得到了 index.html、python.html...et
我有这个索引菜单:
我有这个 Python 菜单:
但是,当我访问另一个页面(例如 Encapsulamiento)时,菜单发生了变化。
如何修复显示所有帖子的滑动菜单栏,如 python.html?
将 Encapsulamiento
添加到 index.rst
中的 toctree
。
.. toctree::
:maxdepth: 2
:caption: Administración de sistemas
devel/python/python
path/to/encapsulamiento
同时将 maxdepth
更改为 2
。
我有这个源目录结构:
.
├── conf.py
├── devel
│ └── python
│ ├── Controles de flujo, condicionales y bucles.md
│ ├── Encapsulamiento.md
| ├── (...)
├── index.rst
├── _static
├── _templates
└── webdevel
这是我的 index.rst
:
¡Bienvenidos a Echemos un bitstazo!
======================================================
Este es mi espacio de documentación personal dónde almaceno todo tipo de conocimientos relacionados con la administración de sistemas y redes informáticas; desarrollo y otros temas varios de IT.
.. toctree::
:maxdepth: 1
:caption: Administración de sistemas
devel/python/python
Índice y tablas
==================
* :ref:`genindex`
* :ref:`search`
这是我的 python.rst
:
Python
======================================================
.. toctree::
:maxdepth: 1
:caption: Contenido:
:glob:
*
我的conf.py
:
project = 'Echemos un bitstazo ~ Wiki'
copyright = '2021, Álvaro Castillo'
author = 'Álvaro Castillo'
extensions = [ 'myst_parser'
]
templates_path = ['_templates']
language = 'es'
exclude_patterns = []
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
完成 sphinx-build -b html source build
之后,我得到了 index.html、python.html...et
我有这个索引菜单:
我有这个 Python 菜单:
但是,当我访问另一个页面(例如 Encapsulamiento)时,菜单发生了变化。
如何修复显示所有帖子的滑动菜单栏,如 python.html?
将 Encapsulamiento
添加到 index.rst
中的 toctree
。
.. toctree::
:maxdepth: 2
:caption: Administración de sistemas
devel/python/python
path/to/encapsulamiento
同时将 maxdepth
更改为 2
。