yamlconfig
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| Tagged mkdocs_mknodes.generator.yamlconfig A YAML node with a custom tag, kept verbatim. |
🛈 DocStrings¶
Round-trip helpers for MkDocs-style YAML config files.
MkDocs configs may contain custom tags (!ENV, !!python/name:...). The generator never
executes them: it loads them as Tagged values
and dumps them back unchanged, so a generated config can safely repeat values of the
config it inherits from.
Tagged
dataclass
¶
A YAML node with a custom tag, kept verbatim.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
value
|
Any
|
|
required |
Source code in mkdocs_mknodes/generator/yamlconfig.py
dumps
¶
Dump data to YAML (Tagged values and callables become tags again).
load_file
¶
Load a MkDocs YAML config file and resolve INHERIT chains.
Source code in mkdocs_mknodes/generator/yamlconfig.py
loads
¶
merge_inherited
¶
Merge configs the way MkDocs INHERIT does: mappings merge, the rest is replaced.
Source code in mkdocs_mknodes/generator/yamlconfig.py
resolve
¶
Resolve !ENV tags in given value (recursively) to plain Python values.