MkModulePage
TODO: THIS NODE ISNT READY FOR PRIMETIME YET
An MkModulePage is an MkPage subclass used to display information about a specific module. It uses a Jinja template to display the module-related information. By default, the Docstrings and tables showing the contained classes and submodules. The template can be adjusted manually in case a different layout is preferred.
Bases: MkTemplatePage
Page showing information about a module.
__init__
¶
__init__(
module: tuple[str, ...] | str | ModuleType,
*,
klasses: list[type] | set[type] | None = None,
title: str | None = None,
template_path: str | None = None,
**kwargs: Any
)
Constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module
|
tuple[str, ...] | str | ModuleType
|
ModuleType or path to model to show info for. |
required |
klasses
|
list[type] | set[type] | None
|
klasses to use |
None
|
title
|
str | None
|
Optional title override. Defaults to module name |
None
|
template_path
|
str | None
|
Name of the template to load |
None
|
kwargs
|
Any
|
further keyword arguments passed to parent |
{}
|
This is an example for an MkModulePage with the default layout, applied to mkdocs.config
:
created: source_filename: /home/runner/work/mknodes/mknodes/mknodes/pages/mkmodulepage/init.py source_function: MkModulePage.init source_line_no: 48 inclusion_level: false title: config
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
Config mkdocs.config.base Base class for MkDocs configuration, plugin configuration (and sub-configuration) objects. |
🛈 DocStrings¶
Config
¶
Bases: UserDict
Base class for MkDocs configuration, plugin configuration (and sub-configuration) objects.
It should be subclassed and have ConfigOption
s defined as attributes.
For examples, see mkdocs/contrib/search/init.py and mkdocs/config/defaults.py.
Behavior as it was prior to MkDocs 1.4 is now handled by LegacyConfig.
__new__
¶
__new__(*args, **kwargs) -> Config
Compatibility: allow referring to LegacyConfig(...)
constructor as Config(...)
.
load_file
¶
load_file(config_file: IO) -> None
Load config options from the open file descriptor of a YAML file.
set_defaults
¶
set_defaults() -> None
Set the base config by going through each validator and getting the default if it has one.
load_config
¶
load_config(
config_file: str | IO | None = None, *, config_file_path: str | None = None, **kwargs
) -> MkDocsConfig
Load the configuration for a given file object or name.
The config_file can either be a file object, string or None. If it is None
the default mkdocs.yml
filename will loaded.
Extra kwargs are passed to the configuration to replace any default values unless they themselves are None.
Page info
Code for this page
Resources
Resources(css=[],
markdown_extensions={'attr_list': {},
'md_in_html': {},
'pymdownx.emoji': {'emoji_generator': <function to_svg at 0x7fd7a6931800>,
'emoji_index': <function twemoji at 0x7fd7a69316c0>},
'pymdownx.magiclink': {'repo': 'mknodes',
'repo_url_shorthand': True,
'user': 'phil65'},
'tables': {}},
plugins=[Plugin('mkdocstrings')],
js=[],
assets=[],
packages=[])