Skip to content

Plugin configuration

Info

Since MkNodes is building template HTMLs in the background, you need to set to the theme custom_dir to an existing folder. This folder must be placed outside of the docs/ dir.

The configuration options of mkdocstrings, written in mkdocs.yml.

custom_templates class-attribute instance-attribute

custom_templates = Optional(Dir(exists=True))

Location of custom templates to use when rendering API objects.

Value should be the path of a directory relative to the MkDocs configuration file.

default_handler class-attribute instance-attribute

default_handler = Type(str, default='python')

The default handler to use. The value is the name of the handler module. Default is "python".

enable_inventory class-attribute instance-attribute

enable_inventory = Optional(Type(bool))

Whether to enable object inventory creation.

enabled class-attribute instance-attribute

enabled = Type(bool, default=True)

Whether to enable the plugin. Default is true. If false, mkdocstrings will not collect or render anything.

handlers class-attribute instance-attribute

handlers = Type(dict, default={})

Global configuration of handlers.

You can set global configuration per handler, applied everywhere, but overridable in each "autodoc" instruction. Example:

plugins:
  - mkdocstrings:
      handlers:
        python:
          options:
            option1: true
            option2: "value"
        rust:
          options:
            option9: 2
Page info
Code for this page
mkdocs_mknodes.manual.get_started_section._
@router.route_page("Plugin configuration", hide="toc")
def _(page: mk.MkPage):
    page += mk.MkTemplate("plugin_configuration.jinja")
    eps = page.ctx.metadata.entry_points.get_group("mkdocs.plugins")
    page += mk.MkDocStrings(
        eps[0].load().config_class,
        show_root_toc_entry=False,
        show_if_no_docstring=True,
        heading_level=4,
        show_bases=False,
        show_source=False,
    )
Resources
Resources(css=[],
          markdown_extensions={'attr_list': {},
                               'md_in_html': {},
                               'pymdownx.emoji': {'emoji_generator': <function to_svg at 0x7f74b1e37b00>,
                                                  'emoji_index': <function twemoji at 0x7f74b1e379c0>},
                               'pymdownx.magiclink': {'repo': 'mkdocs_mknodes',
                                                      'repo_url_shorthand': True,
                                                      'user': 'phil65'}},
          plugins=[Plugin('mkdocstrings')],
          js=[],
          assets=[],
          packages=[])
Metadata
created:
  source_filename: /home/runner/work/mkdocs-mknodes/mkdocs-mknodes/mkdocs_mknodes/manual/root.py
  source_function: Build.on_root
  source_line_no: 24
hide:
- toc
template: SUMMARY.html
title: Plugin configuration