Python sphinx sphinx构建与differents index.rst输入文件
我能否将sphinx的差异Python sphinx sphinx构建与differents index.rst输入文件,python-sphinx,Python Sphinx,我能否将sphinx的差异index1.rst作为build。/build/html\u 1/的参数,以及index2.rst作为build。/build/html\u 2/的参数: 我在sphinx build文档中找到了如何定义目标文件夹,但没有关于指定index.rst文件的内容您可以根据环境变量设置master\u doc 在conf.py中: import os master_doc = os.environ.get('INDEX') 在Makefile中,您可以传递所需的环境变量:
index1.rst
作为build。/build/html\u 1/
的参数,以及index2.rst
作为build。/build/html\u 2/
的参数:
我在
sphinx build
文档中找到了如何定义目标文件夹,但没有关于指定index.rst文件的内容您可以根据环境变量设置master\u doc
在conf.py
中:
import os
master_doc = os.environ.get('INDEX')
在Makefile
中,您可以传递所需的环境变量:
html1:
INDEX=index1.rst $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html1
html2:
INDEX=index2.rst $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html2