module sphinxext.sphinx_faqref_extension
¶
Short summary¶
module pyquickhelper.sphinxext.sphinx_faqref_extension
Defines a sphinx extension to keep track of FAQ.
Classes¶
class |
truncated documentation |
---|---|
A |
|
defines |
|
A list of all faqref entries, for a specific tag. |
|
defines |
Functions¶
function |
truncated documentation |
---|---|
depart_faqref_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py |
|
depart_faqref_node |
|
merge_faqref |
|
process_faqref_nodes |
|
collect all faqref in the environment this is not done in the directive itself because it some transformations … |
|
purge_faqrefs |
|
setup for |
|
visit_faqref_node |
|
visit_faqreflist_node see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py |
Methods¶
method |
truncated documentation |
---|---|
calls run from |
|
calls run from |
Documentation¶
Defines a sphinx extension to keep track of FAQ.
-
class
pyquickhelper.sphinxext.sphinx_faqref_extension.
FaqRef
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source][source]¶ Bases:
pyquickhelper.sphinxext.sphinx_blocref_extension.BlocRef
A
faqref
entry, displayed in the form of an admonition. It takes the following options:title: a title for the bloc
tag: a tag to have several categories of blocs (optional)
lid or label: a label to refer to
index: to add an entry to the index (comma separated)
Example:
.. faqref:: :title: example of a blocref :lid: id-you-can-choose An example of code: :: print("mignon")
Which renders as:
example of a faqref
An example of code:
print("mignon")
All blocs can be displayed in another page by using
faqreflist
:.. faqreflist:: :tag: dummy_example2 :sort: title
Only blocs tagged as
dummy_example
will be inserted here. The optionsort
sorts items by title, number, file. You also link to it by typing:ref:'anchor <id-you-can-choose2>'
which gives something like link_to_blocref. The link must receive a name.example of a faqref
An example of code:
print("mignon")
(original entry : sphinx_faqref_extension.py:docstring of pyquickhelper.sphinxext.sphinx_faqref_extension.FaqRef, line 23)
-
node_class
[source]¶ alias of
faqref_node
-
class
pyquickhelper.sphinxext.sphinx_faqref_extension.
FaqRefList
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source][source]¶ Bases:
pyquickhelper.sphinxext.sphinx_blocref_extension.BlocRefList
A list of all faqref entries, for a specific tag.
tag: a tag to filter bloc having this tag
sort: a way to sort the blocs based on the title, file, number, default: title
contents: add a bullet list with links to added blocs
Example:
.. faqreflist:: :tag: issue :contents:
-
node_class
[source]¶ alias of
faqreflist
-
run
()[source][source]¶ calls run from
BlocRefList
and add default tag if not present
-
pyquickhelper.sphinxext.sphinx_faqref_extension.
depart_faqref_node
(self, node)[source][source]¶ depart_faqref_node, see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py
-
pyquickhelper.sphinxext.sphinx_faqref_extension.
depart_faqreflist_node
(self, node)[source][source]¶ depart_faqref_node
-
class
pyquickhelper.sphinxext.sphinx_faqref_extension.
faqref_node
(rawsource='', *children, **attributes)[source][source]¶ Bases:
docutils.nodes.admonition
defines
faqref
ndoe
-
class
pyquickhelper.sphinxext.sphinx_faqref_extension.
faqreflist
(rawsource='', *children, **attributes)[source][source]¶ Bases:
docutils.nodes.General
,docutils.nodes.Element
defines
faqreflist
node
-
pyquickhelper.sphinxext.sphinx_faqref_extension.
merge_faqref
(app, env, docnames, other)[source][source]¶
-
pyquickhelper.sphinxext.sphinx_faqref_extension.
process_faqref_nodes
(app, doctree, fromdocname)[source][source]¶
-
pyquickhelper.sphinxext.sphinx_faqref_extension.
process_faqrefs
(app, doctree)[source][source]¶ collect all faqref in the environment this is not done in the directive itself because it some transformations must have already been run, e.g. substitutions
-
pyquickhelper.sphinxext.sphinx_faqref_extension.
setup
(app)[source][source]¶ setup for
faqref
(sphinx)
-
pyquickhelper.sphinxext.sphinx_faqref_extension.
visit_faqreflist_node
(self, node)[source][source]¶ see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py