2008-11-09 19:46:32 +01:00
|
|
|
:mod:`sphinx.ext.todo` -- Support for todo items
|
|
|
|
|
================================================
|
|
|
|
|
|
|
|
|
|
.. module:: sphinx.ext.todo
|
|
|
|
|
:synopsis: Allow inserting todo items into documents.
|
|
|
|
|
.. moduleauthor:: Daniel Bültmann
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 0.5
|
|
|
|
|
|
|
|
|
|
There are two additional directives when using this extension:
|
|
|
|
|
|
2010-04-17 10:39:51 +02:00
|
|
|
.. rst:directive:: todo
|
2008-11-09 19:46:32 +01:00
|
|
|
|
2010-04-17 10:39:51 +02:00
|
|
|
Use this directive like, for example, :rst:dir:`note`.
|
2008-11-09 19:46:32 +01:00
|
|
|
|
2014-06-18 12:34:28 -04:00
|
|
|
It will only show up in the output if :confval:`todo_include_todos` is
|
|
|
|
|
``True``.
|
2008-11-09 19:46:32 +01:00
|
|
|
|
2015-11-29 12:02:02 +09:00
|
|
|
.. versionadded:: 1.3.2
|
2019-05-21 23:13:41 +09:00
|
|
|
This directive supports an ``class`` option that determines the class
|
|
|
|
|
attribute for HTML output. If not given, the class defaults to
|
|
|
|
|
``admonition-todo``.
|
2015-11-29 12:02:02 +09:00
|
|
|
|
2008-11-09 19:46:32 +01:00
|
|
|
|
2010-04-17 10:39:51 +02:00
|
|
|
.. rst:directive:: todolist
|
2008-11-09 19:46:32 +01:00
|
|
|
|
|
|
|
|
This directive is replaced by a list of all todo directives in the whole
|
2014-06-18 12:34:28 -04:00
|
|
|
documentation, if :confval:`todo_include_todos` is ``True``.
|
2008-11-09 19:46:32 +01:00
|
|
|
|
2009-01-10 22:18:18 +01:00
|
|
|
|
2018-06-08 17:27:13 +01:00
|
|
|
These can be configured as seen below.
|
|
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
|
-------------
|
2009-01-10 22:18:18 +01:00
|
|
|
|
2008-11-09 19:46:32 +01:00
|
|
|
.. confval:: todo_include_todos
|
|
|
|
|
|
2014-06-18 11:53:25 -04:00
|
|
|
If this is ``True``, :rst:dir:`todo` and :rst:dir:`todolist` produce output,
|
|
|
|
|
else they produce nothing. The default is ``False``.
|
2016-02-08 23:31:02 +09:00
|
|
|
|
2016-07-02 19:15:06 +09:00
|
|
|
.. confval:: todo_emit_warnings
|
|
|
|
|
|
|
|
|
|
If this is ``True``, :rst:dir:`todo` emits a warning for each TODO entries.
|
|
|
|
|
The default is ``False``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
2016-02-08 23:31:02 +09:00
|
|
|
.. confval:: todo_link_only
|
|
|
|
|
|
2019-05-21 23:13:41 +09:00
|
|
|
If this is ``True``, :rst:dir:`todolist` produce output without file path and
|
|
|
|
|
line, The default is ``False``.
|
2016-02-08 23:31:02 +09:00
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
2016-07-02 19:15:06 +09:00
|
|
|
autodoc provides the following an additional event:
|
|
|
|
|
|
|
|
|
|
.. event:: todo-defined (app, node)
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
2019-05-21 23:13:41 +09:00
|
|
|
Emitted when a todo is defined. *node* is the defined
|
|
|
|
|
``sphinx.ext.todo.todo_node`` node.
|