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 |
Properties¶
property |
truncated documentation |
---|---|
|
Return the document root node of the tree containing this Node. |
|
Return the document root node of the tree containing this Node. |
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]¶
Bases:
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]¶
Bases:
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]¶
calls run from
BlocRefList
and add default tag if not present
- pyquickhelper.sphinxext.sphinx_faqref_extension.depart_faqref_node(self, node)[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]¶
depart_faqref_node
- class pyquickhelper.sphinxext.sphinx_faqref_extension.faqref_node(rawsource='', *children, **attributes)[source]¶
Bases:
admonition
defines
faqref
ndoe
- class pyquickhelper.sphinxext.sphinx_faqref_extension.faqreflist(rawsource='', *children, **attributes)[source]¶
Bases:
General
,Element
defines
faqreflist
node
- pyquickhelper.sphinxext.sphinx_faqref_extension.process_faqref_nodes(app, doctree, fromdocname)[source]¶
- pyquickhelper.sphinxext.sphinx_faqref_extension.process_faqrefs(app, doctree)[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.visit_faqreflist_node(self, node)[source]¶
see https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/html.py