templatecontext
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
MkNodesConfig mkdocs_mknodes.plugin.mknodesconfig |
||
TemplateContext mkdocs_mknodes.commands.templatecontext |
🛈 DocStrings¶
TemplateContext
¶
Bases: TypedDict
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nav
|
ForwardRef('Navigation', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
pages
|
ForwardRef('Sequence[File]', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
base_url
|
ForwardRef('str', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
extra_css
|
ForwardRef('Sequence[str]', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
extra_javascript
|
ForwardRef('Sequence[str]', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
mkdocs_version
|
ForwardRef('str', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
mknodes_version
|
ForwardRef('str', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
build_date_utc
|
ForwardRef('datetime', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
config
|
ForwardRef('MkNodesConfig', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
page
|
ForwardRef('Page | None', module='mkdocs_mknodes.commands.templatecontext')
|
|
required |
Source code in mkdocs_mknodes/commands/templatecontext.py
16 17 18 19 20 21 22 23 24 25 26 |
|
get_context
¶
get_context(
nav: Navigation,
files: Sequence[File] | Files,
config: MkNodesConfig,
page: Page | None = None,
base_url: str = "",
) -> TemplateContext
Return the template context for a given page or template.
Source code in mkdocs_mknodes/commands/templatecontext.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|