mkdocs_plugin ¤
This module contains an optional plugin for MkDocs.
Modules:
-
formatters
–This subpackage contains all the formatters.
Classes:
-
MarkdownExecPlugin
–MkDocs plugin to easily enable custom fences for code blocks execution.
-
MarkdownExecPluginConfig
–Configuration of the plugin (for
mkdocs.yml
).
MarkdownExecPlugin ¤
Bases: BasePlugin[MarkdownExecPluginConfig]
MkDocs plugin to easily enable custom fences for code blocks execution.
Methods:
-
on_config
–Configure the plugin.
on_config ¤
on_config(config: MkDocsConfig) -> MkDocsConfig | None
Configure the plugin.
Hook for the on_config
event. In this hook, we add custom fences for all the supported languages.
We also save the Markdown extensions configuration into markdown_config
.
Parameters:
-
config
(MkDocsConfig
) –The MkDocs config object.
Returns:
-
MkDocsConfig | None
–The modified config.
MarkdownExecPluginConfig ¤
Bases: Config
Configuration of the plugin (for mkdocs.yml
).
Attributes:
-
ansi
–Whether the
ansi
extra is required when installing the package. -
languages
–Which languages to enabled the extension for.
ansi class-attribute
instance-attribute
¤
ansi = Choice(
("auto", "off", "required", True, False), default="auto"
)
Whether the ansi
extra is required when installing the package.