2012-09-14 65 views
4

我試圖學習獅身人面像,我堅持只是基本的例子。我在源目錄中的make html上遇到以下錯誤。無法將獅身人面像鏈接到另一個文檔

Running Sphinx v1.1.3 
loading pickled environment... not yet created 
building [html]: targets for 2 source files that are out of date 
updating environment: 2 added, 0 changed, 0 removed 
reading sources... [100%] intro             
/home/owner/Desktop/doc/index.rst:11: ERROR: Error in "toctree" directive: 
invalid option block. 

.. toctree:: 
    :maxdepth: 2 
    intro.rst 
looking for now-outdated files... none found 
pickling environment... done 
checking consistency... /home/owner/Desktop/doc/intro.rst:: WARNING: document isn't included in any toctree 
done 
preparing documents... done 
writing output... [100%] intro             
writing additional files... genindex search 
copying static files... done 
dumping search index... done 
dumping object inventory... done 
build succeeded, 2 warnings. 

Build finished. The HTML pages are in _build/html. 

我也嘗試引用intro代替intro.rst既不似乎工作。 index.rstintro.rst位於相同的目錄中。我使用sphinx-quickstart和所有默認選項製作了該項目。

+0

你能發佈index.rst的確切內容嗎? – jterrace

回答

6

您需要在指令的選項及其內容之間留空行。您也不需要文件擴展名。更改爲:

.. toctree:: 
    :maxdepth: 2 

    intro