22

私はスフィンクスが初めてです。チュートリアルを試してみましたが、コンテンツにリンクを生成できませんでした。私が得たエラー

C:\Users\mhaikalm\sphinxtest\source\index.rst:11: WARNING: toctree contains refe
rence to document 'intro' that doesn't have a title: no link will be generated
C:\Users\mhaikalm\sphinxtest\source\index.rst:11: WARNING: toctree contains refe
rence to document 'zuhdi' that doesn't have a title: no link will be generated
writing additional files... (0 module code pages) genindex search
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded, 3 warnings.

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

と同じディレクトリにとを作成zuhdi.rstしました。ドキュメントにタイトルを付けるにはどうすればよいですか?intro.rstindex.rst

参考までに、私の index.rst には次の行が含まれています。

Contents:

.. toctree::
   :maxdepth: 2

   intro
   zuhdi

リンクを toctree に配置するには、ドキュメントが存在している必要がありますか? intro.rstandzuhdi.rstは単なる空のファイルです。

4

1 に答える 1

34

にタイトルがないため、このエラーが発生していますintro.rst
これを修正するには、 にタイトルを追加しintro.rstます。タイトルを にしたい場合My Title、次の 2 行を の最初の行にすることでタイトルを追加できますintro.rst

My Title
*********

タイトルに完全に下線を引くのに十分な文字数が必要であることに注意してください*。そうしないと、タイトルの形式が正しくないか下線が引かれているという別のエラーが発生します。

于 2012-12-29T07:29:19.007 に答える