Python sphinx 在主文档中包含指令
在我的Python sphinx 在主文档中包含指令,python-sphinx,restructuredtext,Python Sphinx,Restructuredtext,在我的conf.py中,我将主机定义为index(index.rst) 当我使用导入rst文件列表时。。include::list.rst其中动态创建了list.rst文件 Project Test ================================ .. include:: list.rst 它工作得很好;但是,当我在同一index.rst中添加一些其他rst名称时,它不起作用,就像以下声明中的static.rst和about.rst: Project Test ======
conf.py
中,我将主机定义为index
(index.rst
)
当我使用导入rst文件列表时。。include::list.rst
其中动态创建了list.rst
文件
Project Test
================================
.. include:: list.rst
它工作得很好;但是,当我在同一index.rst
中添加一些其他rst名称时,它不起作用,就像以下声明中的static.rst
和about.rst
:
Project Test
================================
.. include:: list.rst
static
about
我创建了一个新文件
staticList.rst
,并移动了所有静态rst名称
.. toctree::
:maxdepth: 1
static
about
并将staticList.rst
包含在index.rst
文件中,它给出了所需的结果,但列表有点不完整
Project Test
================================
.. include:: list.rst
.. include:: staticList.rst
Project Test
================================
.. include:: list.rst
.. include:: staticList.rst