22API References
33==============
44
5- The Render Pipeline
6- ===================
5+ .. _ api-directives :
6+ .. _ api-roles :
77
8- The pipeline defines how nodes carrying data are generated and when they are
9- rendered as part of the document.
8+ Roles and Directives
9+ ====================
1010
11- 1. Generation: :py:class: `~sphinxnotes.render.BaseContextRole `,
12- :py:class: `~sphinxnotes.render.BaseContextDirective ` and their subclasses
13- create :py:class: `~sphinxnotes.render.pending_node ` on document parsing,
14- and the node will be inserted to the document tree. The node contains:
11+ .. seealso ::
1512
16- - :ref: `context `, the dynamic content of a Jinja template
13+ For a minimal end-to-end example of creating your own directive, start with
14+ :ref: `ext-directives `.
1715
18- - :py:class: `~sphinxnotes.render.Template `,
19- the Jinja template for rendering context to markup text
20- (reStructuredText or Markdown)
16+ Base Role Classes
17+ -----------------
18+
19+ .. autoclass :: sphinxnotes.render.BaseContextRole
20+ :show-inheritance:
21+ :members: process_pending_node, queue_pending_node, queue_context, current_context, current_template
22+
23+ .. autoclass :: sphinxnotes.render.BaseDataDefineRole
24+ :show-inheritance:
25+ :members: process_pending_node, queue_pending_node, queue_context, current_schema, current_template
26+
27+ Base Directive Classes
28+ ----------------------
2129
22- 2. Render: the `` pending_node `` node will be rendered at the appropriate
23- :py:class: ` ~sphinxnotes.render.Phase `, depending on
24- :py:attr: ` ~sphinxnotes.render.pending_node.template.phase `.
30+ .. autoclass :: sphinxnotes.render.BaseContextDirective
31+ :show-inheritance:
32+ :members: process_pending_node, queue_pending_node, queue_context, current_raw_data, current_context, current_template
2533
26- For a task-oriented explanation of template variables, extra context, and phase
27- selection, see :doc: `tmpl `.
34+ .. autoclass :: sphinxnotes.render.BaseDataDefineDirective
35+ :show-inheritance:
36+ :members: process_pending_node, queue_pending_node, queue_context, current_raw_data, current_schema, current_template
37+
38+ .. autoclass :: sphinxnotes.render.StrictDataDefineDirective
39+ :show-inheritance:
40+ :members: derive
2841
2942Node
30- -----
43+ =====
3144
3245.. autoclass :: sphinxnotes.render.pending_node
3346
34- .. _ context :
47+ .. _ api-context :
3548
3649Context
37- -------
50+ =======
3851
3952Context refers to the dynamic content of a Jinja template. It can be:
4053
@@ -57,15 +70,15 @@ Context refers to the dynamic content of a Jinja template. It can be:
5770 :members: resolve
5871
5972``PendingContext `` Implementations
60- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73+ ----------------------------------
6174
6275.. autoclass :: sphinxnotes.render.UnparsedData
6376 :show-inheritance:
6477
6578.. _extractx :
6679
6780Template
68- --------
81+ ========
6982
7083See :doc: `tmpl ` for the higher-level guide.
7184
@@ -76,12 +89,12 @@ See :doc:`tmpl` for the higher-level guide.
7689 :members:
7790
7891Extra Context
79- -------------
92+ =============
8093
8194See :doc: `tmpl ` for built-in extra-context names such as ``doc `` and
8295``sphinx ``, plus usage examples.
8396
84- .. autofunction :: sphinxnotes.render.extra_context
97+ .. autodecorator :: sphinxnotes.render.extra_context
8598
8699.. autoclass :: sphinxnotes.render.ParsingPhaseExtraContext
87100 :members: phase, generate
@@ -99,36 +112,10 @@ See :doc:`tmpl` for built-in extra-context names such as ``doc`` and
99112 :members: phase, generate
100113 :undoc-members:
101114
102- Base Roles and Directives
103- -------------------------
104-
105- For a minimal end-to-end example of a custom directive, start with :doc: `usage `.
106-
107- Base Role Classes
108- ~~~~~~~~~~~~~~~~~
109-
110- .. autoclass :: sphinxnotes.render.BaseContextRole
111- :show-inheritance:
112- :members: process_pending_node, queue_pending_node, queue_context, current_context, current_template
113-
114- .. autoclass :: sphinxnotes.render.BaseDataDefineRole
115- :show-inheritance:
116- :members: process_pending_node, queue_pending_node, queue_context, current_schema, current_template
117-
118- Base Directive Classes
119- ~~~~~~~~~~~~~~~~~~~~~~
115+ Filters
116+ =======
120117
121- .. autoclass :: sphinxnotes.render.BaseContextDirective
122- :show-inheritance:
123- :members: process_pending_node, queue_pending_node, queue_context, current_context, current_template
124-
125- .. autoclass :: sphinxnotes.render.BaseDataDefineDirective
126- :show-inheritance:
127- :members: process_pending_node, queue_pending_node, queue_context, current_schema, current_template
128-
129- .. autoclass :: sphinxnotes.render.StrictDataDefineDirective
130- :show-inheritance:
131- :members: derive
118+ .. autodecorator :: sphinxnotes.render.filter
132119
133120Data, Field and Schema
134121======================
0 commit comments