Automatic documentation from sources, for MkDocs.
Project description
mkdocstrings
Automatic documentation from sources, for MkDocs. Come have a chat or ask questions on our Gitter channel.
Features - Requirements - Installation - Quick usage
Features
-
Language-agnostic: just like MkDocs, mkdocstrings is written in Python but is language-agnostic. It means you can use it with any programming language, as long as there is a handler for it. We currently have handlers for the Crystal, Python, and VBA languages, as well as for shell scripts/libraries. Maybe you'd like to add another one to the list? :wink:
-
Multiple themes support: each handler can offer multiple themes. Currently, we offer the :star: Material theme :star: as well as basic support for the ReadTheDocs and MkDocs themes for the Python handler.
-
Cross-references across pages: mkdocstrings makes it possible to reference headings in other Markdown files with the classic Markdown linking syntax:
[identifier][]
or[title][identifier]
-- and you don't need to remember which exact page this object was on. This works for any heading that's produced by a mkdocstrings language handler, and you can opt to include any Markdown heading into the global referencing scheme.Note: in versions prior to 0.15 all Markdown headers were included, but now you need to opt in.
-
Cross-references across sites: similarly to Sphinx's intersphinx extension, mkdocstrings can reference API items from other libraries, given they provide an inventory and you load that inventory in your MkDocs configuration.
-
Inline injection in Markdown: instead of generating Markdown files, mkdocstrings allows you to inject documentation anywhere in your Markdown contents. The syntax is simple:
::: identifier
followed by a 4-spaces indented YAML block. The identifier and YAML configuration will be passed to the appropriate handler to collect and render documentation. -
Global and local configuration: each handler can be configured globally in
mkdocs.yml
, and locally for each "autodoc" instruction. -
Reasonable defaults: you should be able to just drop the plugin in your configuration and enjoy your auto-generated docs.
Used by
mkdocstrings is used by well-known companies, projects and scientific teams: Ansible, Apache, Google, Jitsi, Microsoft, Prefect, Pydantic, and more...
Installation
With pip
:
pip install mkdocstrings
You can install support for specific languages using extras, for example:
pip install 'mkdocstrings[crystal,python]'
See the available language handlers.
With conda
:
conda install -c conda-forge mkdocstrings
Quick usage
In mkdocs.yml
:
site_name: "My Library"
theme:
name: "material"
plugins:
- search
- mkdocstrings
In one of your markdown files:
# Reference
::: my_library.my_module.my_class
See the Usage section of the docs for more examples!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mkdocstrings-0.24.3.tar.gz
.
File metadata
- Download URL: mkdocstrings-0.24.3.tar.gz
- Upload date:
- Size: 31.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f327b234eb8d2551a306735436e157d0a22d45f79963c60a8b585d5f7a94c1d2 |
|
MD5 | 8ea4f08eb9ccbfa429432627367a06a4 |
|
BLAKE2b-256 | 6d0b424efa5498ede474a8104f57dc35666b7e2f0025c370e469b9ea00ab23d9 |
Provenance
File details
Details for the file mkdocstrings-0.24.3-py3-none-any.whl
.
File metadata
- Download URL: mkdocstrings-0.24.3-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c9cf2a32958cd161d5428699b79c8b0988856b0d4a8c5baf8395fc1bf4087c3 |
|
MD5 | d166e68f9dbd9b2f61a87cf152ae519f |
|
BLAKE2b-256 | a8c25d2fa50f67b270d67f867fe2c8814ffa910c2d49fda1910428a55cb6df54 |