Skip to content

General options¤

extra¤

The extra option lets you inject additional variables into the Jinja context used when rendering templates. You can then use this extra context in your overridden templates.

Local extra options will be merged into the global extra option:

in mkdocs.yml (global configuration)
plugins:
- mkdocstrings:
    handlers:
      shell:
        options:
          extra:
            hello: world
in docs/some_page.md (local configuration)
::: your-script
    options:
      extra:
        foo: bar

...will inject both hello and foo into the Jinja context when rendering your-script.