| 1 |
:mod:`sphinx.ext.todo` -- Support for todo items |
| 2 |
================================================ |
| 3 |
|
| 4 |
.. module:: sphinx.ext.todo |
| 5 |
:synopsis: Allow inserting todo items into documents. |
| 6 |
.. moduleauthor:: Daniel Bültmann |
| 7 |
|
| 8 |
.. versionadded:: 0.5 |
| 9 |
|
| 10 |
.. role:: code-py(code) |
| 11 |
:language: Python |
| 12 |
|
| 13 |
There are two additional directives when using this extension: |
| 14 |
|
| 15 |
.. rst:directive:: todo |
| 16 |
|
| 17 |
Use this directive like, for example, :rst:dir:`note`. |
| 18 |
|
| 19 |
It will only show up in the output if :confval:`todo_include_todos` is |
| 20 |
``True``. |
| 21 |
|
| 22 |
.. versionadded:: 1.3.2 |
| 23 |
This directive supports an ``class`` option that determines the class |
| 24 |
attribute for HTML output. If not given, the class defaults to |
| 25 |
``admonition-todo``. |
| 26 |
|
| 27 |
|
| 28 |
.. rst:directive:: todolist |
| 29 |
|
| 30 |
This directive is replaced by a list of all todo directives in the whole |
| 31 |
documentation, if :confval:`todo_include_todos` is ``True``. |
| 32 |
|
| 33 |
|
| 34 |
These can be configured as seen below. |
| 35 |
|
| 36 |
Configuration |
| 37 |
------------- |
| 38 |
|
| 39 |
.. confval:: todo_include_todos |
| 40 |
:type: :code-py:`bool` |
| 41 |
:default: :code-py:`False` |
| 42 |
|
| 43 |
If this is ``True``, :rst:dir:`todo` and :rst:dir:`todolist` produce output, |
| 44 |
else they produce nothing. |
| 45 |
|
| 46 |
.. confval:: todo_emit_warnings |
| 47 |
:type: :code-py:`bool` |
| 48 |
:default: :code-py:`False` |
| 49 |
|
| 50 |
If this is ``True``, :rst:dir:`todo` emits a warning for each TODO entries. |
| 51 |
|
| 52 |
.. versionadded:: 1.5 |
| 53 |
|
| 54 |
.. confval:: todo_link_only |
| 55 |
:type: :code-py:`bool` |
| 56 |
:default: :code-py:`False` |
| 57 |
|
| 58 |
If this is ``True``, :rst:dir:`todolist` produce output without file path and |
| 59 |
line. |
| 60 |
|
| 61 |
.. versionadded:: 1.4 |
| 62 |
|
| 63 |
autodoc provides the following an additional event: |
| 64 |
|
| 65 |
.. event:: todo-defined (app, node) |
| 66 |
|
| 67 |
.. versionadded:: 1.5 |
| 68 |
|
| 69 |
Emitted when a todo is defined. *node* is the defined |
| 70 |
``sphinx.ext.todo.todo_node`` node. |