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