Skip to content

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 str
    {}
    resources str
    Resources(css=[], markdown_extensions={}, plugins=[], js=[], assets=[], packages=[])
    build_files str
    {}
    node_counter str
    Counter()
    templates str
    []
    Source code in mkdocs_mknodes/buildcontext.py
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    @dataclasses.dataclass
    class BuildContext(contexts.Context):
        """Information about a website build."""
    
        page_mapping: dict = dataclasses.field(default_factory=dict)
        """A dictionary mapping all page filenames to the corresponding MkPages."""
        resources: resources.Resources = dataclasses.field(
            default_factory=resources.Resources,
        )
        """All resources (JS, CSS, extensions) inferred from the build."""
        # node_stats: list[contexts.NodeBuildStats] = dataclasses.field(default_factory=list)
        """Some stats about nodes construction."""
        build_files: dict = dataclasses.field(default_factory=dict)
        """A mapping of filepaths -> Markdown."""
        node_counter: collections.Counter = dataclasses.field(
            default_factory=collections.Counter,
        )
        """Counter containing the amount of creations for each node class."""
        templates: list[mk.PageTemplate] = dataclasses.field(default_factory=list)
        """A list of required templates."""
    

    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.