module sphinxext.sphinxext_helper
¶
Functions¶
function |
truncated documentation |
---|---|
Retrieves an environment and a docname inside a directive. |
|
Add a variables in the config file if it does not have it yet. |
Documentation¶
Helpers for sphinx extensions.
-
pyquickhelper.sphinxext.sphinxext_helper.
get_env_state_info
(self)[source]¶ Retrieves an environment and a docname inside a directive.
- Parameters
self – self inside a Sphinx directive
- Returns
env, docname, lineno
-
pyquickhelper.sphinxext.sphinxext_helper.
try_add_config_value
(app, name, default, rebuild, type_s=())[source]¶ Add a variables in the config file if it does not have it yet.
- Parameters
app – Sphinx application
name – name of the variable
default – default value
rebuild – see below
type_s – expected types
- Returns
True if added, False if already present.
Rebuilds can be (source: Sphinx.add_config_value):
‘env’ if a change in the setting only takes effect when a document is parsed - this means that the whole environment must be rebuilt.
‘html’ if a change in the setting needs a full rebuild of HTML documents.
‘’ if a change in the setting will not need any special rebuild.