Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python sphinx sphinx构建与differents index.rst输入文件_Python Sphinx - Fatal编程技术网

Python sphinx sphinx构建与differents index.rst输入文件

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中,您可以传递所需的环境变量:

我能否将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
中,您可以传递所需的环境变量:

html1:
        INDEX=index1.rst $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html1

html2:
        INDEX=index2.rst $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html2