python-sphinx - 在 sphinx 文档中启用 `todo` 功能
问题描述
我正在尝试使用功能,我在sphinx-docstodo
上找到了一个链接和以下语法
.. todo::
但它说我需要设置todo_include_todos
为True
,默认情况下False
,我需要更新哪个文件才能启用?
我发现另一个 SO post Sphinx todo box 没有显示,但不认为它提到了我需要设置配置的文件。
解决方案
sphinx.ext.todo
是一个 Sphinx 扩展,可以通过将其添加到您的扩展列表中来启用conf.py
:
extensions = [
'extname',
'sphinx.ext.todo',
]
启用后,您需要通过将值设置为 来配置它todo_include_todos
,True
也在您的conf.py
:
# Display todos by setting to True
todo_include_todos = True
待办事项的主题支持各不相同。
另请参阅http://www.sphinx-doc.org/en/stable/config.html#confval-extensions
推荐阅读
- python - 如何在 python 中实现二维数组/里程计?
- java - 使用 Spring Boot 版本 2.4.3 时,文件 pom.xml 在第一行给出错误
- sql - Teradata 如何使用计数(不同)?
- c++ - 使用 MPI_Send 和 MPI_Recv 而不是 MPI_Gather
- docker - 关于 kubenetes pod 的 CPU/内存利用率,主机的 top 命令显示了什么
- python - 如何将文本文件转换为 json 文件?
- python - 如何在未完成工作的情况下识别 python 程序终止
- rubygems - 如何更新危险
- javascript - 具有动态反应组件处理程序绑定的 Javascript 循环
- html - 如何将 calc() 与 min-content 一起使用?