ランキングに戻る

mkdocstrings/mkdocstrings

Pythonmkdocstrings.github.io

:blue_book: Automatic documentation from sources, for MkDocs.

mkdocsmkdocs-pluginpythondocstringsautodocmkdocstringsmaterial-theme
スター成長
スター
2.1k
フォーク
125
週間成長
Issue
8
5001k1.5k2k
2023年1月2024年3月2025年5月2026年7月
成果物PyPIpip install mkdocstrings
README

mkdocstrings

ci documentation pypi version conda version gitter

Automatic documentation from sources, for MkDocs. Come have a chat or ask questions on our Gitter channel.


Features - Installation - Quick usage

mkdocstrings_gif1

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 C, Crystal, GitHub Actions, Python, MATLAB, TypeScript, 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, FastAPI, Google, IBM, Jitsi, Microsoft, NVIDIA, Prefect, Pydantic, Textual, and more...

Installation

The mkdocstrings package doesn't provide support for any language: it's just a common base for language handlers. It means you likely want to install it with one or more official handlers, using extras. For example, to install it with Python support:

pip install 'mkdocstrings[python]'

Alternatively, you can directly install the language handlers themselves, which depend on mkdocstrings anyway:

pip install mkdocstrings-python

This will give you more control over the accepted range of versions for the handlers themselves.

See the official language handlers.


With conda:

conda install -c conda-forge mkdocstrings mkdocstrings-python

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!

Sponsors

Silver sponsors

FastAPI

Bronze sponsors

Nixtla


ofek samuelcolvin tlambert03 ssbarnea femtomc cmarqu kolenaIO ramnes machow BenHammersley trevorWieland MarcoGorelli analog-cbarber OdinManiac rstudio-sponsorship schlich butterlyn livingbio NemetschekAllplan EricJayHartman 15r10nk activeloopai roboflow cmclaughlin RapidataAI rodolphebarbanneau theSymbolSyndicate blakeNaccarato ChargeStorm Cusp-AI

And 4 more private sponsor(s).

関連リポジトリ
squidfunk/mkdocs-material

Documentation that simply works

PythonPyPIMIT Licensemkdocstheme
squidfunk.github.io/mkdocs-material/
27.1k4.1k
mkdocs/mkdocs

Project documentation with Markdown.

PythonPyPIBSD 2-Clause "Simplified" Licensemkdocsdocumentation
mkdocs.org
22.3k2.6k
readthedocs/readthedocs.org

The source code that powers readthedocs.org

PythonPyPIMIT Licensepythondocs
readthedocs.org
8.4k3.7k
peaceiris/actions-gh-pages

GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.

TypeScriptnpmMIT Licensegithub-actionsgithub-pages
github.com/marketplace/actions/github-pages-action
5.3k451
privacyguides/privacyguides.org

Protect your data against global mass surveillance programs.

MarkdownCreative Commons Attribution Share Alike 4.0 Internationalprivacyencryption
privacyguides.org
4.1k289
mkdocs/catalog

:trophy: :books: A list of awesome MkDocs projects and plugins.

PythonPyPICreative Commons Attribution Share Alike 4.0 Internationalbest-ofbest-of-list
1.8k128
dongweiming/wechat-admin

Wechat Management System

VueGNU General Public License v3.0wechatvue
dongweiming.github.io/wechat-admin/
1.7k417
Ac-Wiki/Ac-Wiki

高等教育学社基础知识开源建设工程|青年大学习

HTMLMIT Licensemkdocs-materialstudents
ac-wiki.org
1.6k93
ekristen/aws-nuke

Remove all the resources from an AWS account

GoGo ModulesMIT Licenseawscli
aws-nuke.ekristen.dev
1.4k137
deis/workflow

The open source PaaS for Kubernetes.

CSSnpmMIT Licensekuberneteshelm
deis.com/workflow/
1.3k176
ml-tooling/best-of-python-dev

🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.

PythonPyPICreative Commons Attribution Share Alike 4.0 Internationalbest-ofbest-of-list
python-dev.best-of.org
1.3k76