:py:mod:`skeleton.demo_role` ============================ .. py:module:: skeleton.demo_role .. autoapi-nested-parse:: 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 ~~~~~~~ .. autoapisummary:: skeleton.demo_role.DemoRole skeleton.demo_role.demo_node Functions ~~~~~~~~~ .. autoapisummary:: skeleton.demo_role.depart_demo_node_html skeleton.demo_role.visit_demo_node_html skeleton.demo_role.visit_icon_node_unsuported Attributes ~~~~~~~~~~ .. autoapisummary:: skeleton.demo_role._NODE_VISITORS skeleton.demo_role.logger .. py:class:: DemoRole Bases: :py:obj:`sphinx.util.docutils.SphinxRole` The demo sphinxrole interpreter. .. py:method:: run() Setup the role in the builder context. .. py:class:: demo_node(rawsource='', *children, **attributes) Bases: :py:obj:`docutils.nodes.General`, :py:obj:`docutils.nodes.Element` The demo node. .. py:function:: depart_demo_node_html(translator, node) Depart from the html output. .. py:function:: visit_demo_node_html(translator, node) Visit the html output. .. py:function:: visit_icon_node_unsuported(translator, node) Raise error when the requested output is not supported. .. py:data:: _NODE_VISITORS .. py:data:: logger