Sphinx源文件在子目录中:“unknown document:index”

时间:2014-11-18 16:18:07

标签: python-sphinx

我正在使用sphinx-doc记录我的python项目,并且我在一个子目录中有一些我的ReST源文件。他们建立得很好,除了他们都发出警告:“未知文件:索引”。

所以我的sphinx源目录是source/(它包含conf.py),我的索引文件是index.rst,如下所示:

==============================================================
Documentation
==============================================================

.. toctree::
   :maxdepth: 2

   code/mort

然后source/code/mort.rst看起来像这样:

``mort`` package
=================

我的项目中没有其他任何rst文件,但是当我运行sphinx来构建项目时,输出是:

running build_sphinx
Running Sphinx v1.2.3
loading pickled environment... done
building [html]: all source files
updating environment: 0 added, 1 changed, 2 removed
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 50%] code/mort
writing output... [100%] index

C:\dev\mort\sphinx\source\code\mort.rst:3: WARNING: unknown document: index
writing additional files... (5 module code pages) _modules/index genindex search
copying extra files... done
dumping search index... done
dumping object inventory... done
build succeeded, 1 warning.

如图所示,这是Sphinx v1.2.3。和python v2.7.5

0 个答案:

没有答案