0

我是 Sphinx 的新手,我试图toctree在 Sphinx 中包含一个,但它似乎完全忽略了我的toctree选择。

我有如下所示的代码:

.. toctree::
   :titlesonly:

  foo
  bar

这也被忽略:

.. toctree::
   :maxdepth: 1

  foo
  bar

结果输出看起来像这样:

    • Foo1
      • Foo12
    • Foo2
  • 酒吧
    • 酒吧1
      • 酒吧12
    • 酒吧2

我正在运行make html以生成 HTML 文档,我想我的 conf.py 文件中的设置可能有误。

4

1 回答 1

3

一致的缩进很重要。将目录树条目的名称向右移动一列,它将起作用。

.. toctree::
   :maxdepth: 1

   foo
   bar
于 2016-03-01T08:05:33.557 回答