skeleton.demo_role#
Demonstration of a custom role for sphinx.
This role should be deleted when starting a new extension but it gives an overview of the different steps to follow to create a new role. It is also used to demonstrate the documentation/test workflows.
Note
We only coded a html output for this role.
Module Contents#
Classes#
The demo sphinxrole interpreter. |
|
The demo node. |
Functions#
|
Depart from the html output. |
|
Visit the html output. |
|
Raise error when the requested output is not supported. |
Attributes#
- class skeleton.demo_role.DemoRole[source]#
Bases:
sphinx.util.docutils.SphinxRoleThe demo sphinxrole interpreter.
- class skeleton.demo_role.demo_node(rawsource='', *children, **attributes)[source]#
Bases:
docutils.nodes.General,docutils.nodes.ElementThe demo node.
- skeleton.demo_role.depart_demo_node_html(translator, node)[source]#
Depart from the html output.
- Parameters:
translator (sphinx.util.docutils.SphinxTranslator) –
node (demo_node) –
- Return type:
None
- skeleton.demo_role.visit_demo_node_html(translator, node)[source]#
Visit the html output.
- Parameters:
translator (sphinx.util.docutils.SphinxTranslator) –
node (demo_node) –
- Return type:
None