作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试学习 sphinx 并且只停留在基本示例上。我在源目录中的 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.rst
和 intro.rst
在同一个目录下。我使用 sphinx-quickstart
和所有默认选项创建了项目。
最佳答案
您需要在指令的选项和它的内容之间有一个空行。您也不需要文件扩展名。将其更改为:
.. toctree::
:maxdepth: 2
intro
关于python - 无法让狮身人面像在 toctree 下链接到另一个文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12426496/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!