buildcontext
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| BuildContext mkdocs_mknodes.buildcontext Information about a website build. |
🛈 DocStrings¶
Module containing the BuildCollector class.
BuildContext
dataclass
¶
Bases: Context
Information about a website build.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page_mapping
|
dict
|
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
<class 'dict'>
|
resources
|
Resources
|
A resource bundle containing different assets. Most of the time this class is used for bundling required resources for a specific node. |
<dynamic>
|
build_files
|
dict
|
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
<class 'dict'>
|
node_counter
|
Counter
|
Dict subclass for counting hashable items. Sometimes called a bag or multiset. Elements are stored as dictionary keys and their counts are stored as dictionary values.
Note: If a count is set to zero or reduced to zero, it will remain in the counter until the entry is deleted or the counter is cleared:
|
<dynamic>
|
templates
|
list[PageTemplate]
|
Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. |
<dynamic>
|
Source code in mkdocs_mknodes/buildcontext.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
build_files
class-attribute
instance-attribute
¶
build_files: dict = field(default_factory=dict)
A mapping of filepaths -> Markdown.
node_counter
class-attribute
instance-attribute
¶
node_counter: Counter = field(default_factory=Counter)
Counter containing the amount of creations for each node class.
page_mapping
class-attribute
instance-attribute
¶
page_mapping: dict = field(default_factory=dict)
A dictionary mapping all page filenames to the corresponding MkPages.
resources
class-attribute
instance-attribute
¶
resources: Resources = field(default_factory=Resources)
All resources (JS, CSS, extensions) inferred from the build.
templates
class-attribute
instance-attribute
¶
templates: list[PageTemplate] = field(default_factory=list)
A list of required templates.