11# mkdocstrings
22
3- [ ![ ci] ( https://github.com/pawamoy /mkdocstrings/workflows/ci/badge.svg )] ( https://github.com/pawamoy /mkdocstrings/actions?query=workflow%3Aci )
4- [ ![ documentation] ( https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat )] ( https://pawamoy .github.io/mkdocstrings / )
3+ [ ![ ci] ( https://github.com/mkdocstrings /mkdocstrings/workflows/ci/badge.svg )] ( https://github.com/mkdocstrings /mkdocstrings/actions?query=workflow%3Aci )
4+ [ ![ documentation] ( https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat )] ( https://mkdocstrings .github.io/ )
55[ ![ pypi version] ( https://img.shields.io/pypi/v/mkdocstrings.svg )] ( https://pypi.org/project/mkdocstrings/ )
66[ ![ conda version] ( https://img.shields.io/conda/vn/conda-forge/mkdocstrings )] ( https://anaconda.org/conda-forge/mkdocstrings )
77[ ![ gitter] ( https://badges.gitter.im/join%20chat.svg )] ( https://gitter.im/mkdocstrings/community )
88
9- Automatic documentation from sources, for MkDocs.
9+ Automatic documentation from sources, for [ MkDocs] ( https://mkdocs.org/ ) .
1010
1111---
1212
@@ -22,71 +22,88 @@ Automatic documentation from sources, for MkDocs.
2222
2323## Features
2424
25- - ** Language agnostic:** just like ` mkdocs ` , ` mkdocstrings ` is written in Python but is language-agnostic.
26- It means you can use it for any language, as long as you implement a
27- [ ` handler ` ] ( https://pawamoy.github.io/mkdocstrings/reference/handlers/__init__/ ) for it.
28- Currently, we only have a [ Python handler] ( https://pawamoy.github.io/mkdocstrings/reference/handlers/python/ ) .
29- Maybe you'd like to contribute another one :wink : ?
30- - ** Multiple themes support:** each handler can offer multiple themes. Currently, we offer the
25+ - [ ** Language-agnostic:** ] ( https://mkdocstrings.github.io/handlers/overview/ )
26+ just like * MkDocs* , * mkdocstrings* is written in Python but is language-agnostic.
27+ It means you can use it with any programming language, as long as there is a
28+ [ ** handler** ] ( https://mkdocstrings.github.io/reference/handlers/base/ ) for it.
29+ The [ Python handler] ( https://mkdocstrings.github.io/handlers/python/ ) is built-in.
30+ [ Others] ( https://mkdocstrings.github.io/handlers/overview/ ) are external.
31+ Maybe you'd like to add another one to the list? :wink :
32+
33+ - [ ** Multiple themes support:** ] ( https://mkdocstrings.github.io/theming/ )
34+ each handler can offer multiple themes. Currently, we offer the
3135 :star : [ Material theme] ( https://squidfunk.github.io/mkdocs-material/ ) :star :
3236 as well as basic support for the ReadTheDocs theme for the Python handler.
33- - ** Cross-references to other objects:** ` mkdocstrings ` makes it possible to reference other headings from your
34- Markdown files with the classic Markdown syntax: ` [identifier][] ` or ` [title][identifier] ` . This feature is language
35- agnostic as well: you can cross-reference any heading that appear in your Markdown pages.
36- If the handler for a particular language renders headings for documented objects, you'll be able to reference them!
37- - ** Inline injection in Markdown:** instead of generating Markdown files, ` mkdocstrings ` allows you to inject
37+
38+ - [ ** Cross-links across pages:** ] ( https://mkdocstrings.github.io/usage/#cross-references )
39+ * mkdocstrings* makes it possible to reference headings in other Markdown files with the classic Markdown linking
40+ syntax: ` [identifier][] ` or ` [title][identifier] ` -- and you don't need to remember which exact page this object was
41+ on. This works for any heading that's produced by a * mkdocstrings* language handler, and you can opt to include
42+ * any* Markdown heading into the global referencing scheme.
43+
44+ ** Note** : in versions prior to 0.15 * all* Markdown headers were included, but now you need to
45+ [ opt in] ( https://mkdocstrings.github.io/usage/#cross-references ) .
46+
47+ - [ ** Inline injection in Markdown:** ] ( https://mkdocstrings.github.io/usage/ )
48+ instead of generating Markdown files, * mkdocstrings* allows you to inject
3849 documentation anywhere in your Markdown contents. The syntax is simple: ` ::: identifier ` followed by a 4-spaces
3950 indented YAML block. The identifier and YAML configuration will be passed to the appropriate handler
4051 to collect and render documentation.
41- - ** Global and local configuration:** each handler can be configured globally in ` mkdocs.yml ` , and locally for each
52+
53+ - [ ** Global and local configuration:** ] ( https://mkdocstrings.github.io/usage/#global-options )
54+ each handler can be configured globally in ` mkdocs.yml ` , and locally for each
4255 "autodoc" instruction.
43- - ** Watch source code directories:** you can tell ` mkdocstrings ` to add directories to be watched by ` mkdocs ` when
56+
57+ - [ ** Watch source code directories:** ] ( https://mkdocstrings.github.io/usage/#watch-directories )
58+ you can tell * mkdocstrings* to add directories to be watched by * MkDocs* when
4459 serving the documentation, for auto-reload.
45- - ** Sane defaults:** you should be able to just drop the plugin in your configuration and enjoy your auto-generated docs.
60+
61+ - ** Reasonable defaults:**
62+ you should be able to just drop the plugin in your configuration and enjoy your auto-generated docs.
4663
4764### Python handler features
4865
4966- ** Data collection from source code** : collection of the object-tree and the docstrings is done by
5067 [ ` pytkdocs ` ] ( https://github.com/pawamoy/pytkdocs ) . The following features are possible thanks to it:
51- - ** Support for type annotations:** ` pytkdocs ` collects your type annotations and ` mkdocstrings ` uses them
68+ - ** Support for type annotations:** ` pytkdocs ` collects your type annotations and * mkdocstrings* uses them
5269 to display parameters types or return types.
5370 - ** Recursive documentation of Python objects:** just use the module dotted-path as identifier, and you get the full
5471 module docs. You don't need to inject documentation for each class, function, etc.
5572 - ** Support for documented attribute:** attributes (variables) followed by a docstring (triple-quoted string) will
5673 be recognized by ` pytkdocs ` in modules, classes and even in ` __init__ ` methods.
5774 - ** Support for objects properties:** ` pytkdocs ` detects if a method is a ` staticmethod ` , a ` classmethod ` , etc.,
5875 it also detects if a property is read-only or writable, and more! These properties will be displayed
59- next to the object signature by ` mkdocstrings ` .
76+ next to the object signature by * mkdocstrings* .
6077 - ** Google-style sections support in docstrings:** ` pytkdocs ` understands ` Arguments: ` , ` Raises: `
61- and ` Returns: ` sections, and returns structured data for ` mkdocstrings ` to render them.
78+ and ` Returns: ` sections, and returns structured data for * mkdocstrings* to render them.
6279 - ** reStructuredText-style sections support in docstrings:** ` pytkdocs ` understands all the
6380 [ reStructuredText fields] ( https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html?highlight=python%20domain#info-field-lists ) ,
64- and returns structured data for ` mkdocstrings ` to render them.
81+ and returns structured data for * mkdocstrings* to render them.
6582 * Note: only RST ** style** is supported, not the whole markup.*
6683 - ** Admonition support in docstrings:** blocks like ` Note: ` or ` Warning: ` will be transformed
6784 to their [ admonition] ( https://squidfunk.github.io/mkdocs-material/extensions/admonition/ ) equivalent.
6885 * We do not support nested admonitions in docstrings!*
6986 - ** Support for reStructuredText in docstrings:** ` pytkdocs ` can parse simple RST.
70- - ** Every object has a TOC entry:** we render a heading for each object, meaning ` mkdocs ` picks them into the Table
71- of Contents, which is nicely display by the Material theme. Thanks to ` mkdocstrings ` cross-reference ability,
87+ - ** Every object has a TOC entry:** we render a heading for each object, meaning * MkDocs * picks them into the Table
88+ of Contents, which is nicely display by the Material theme. Thanks to * mkdocstrings* cross-reference ability,
7289 you can even reference other objects within your docstrings, with the classic Markdown syntax:
7390 ` [this object][package.module.object] ` or directly with ` [package.module.object][] `
74- - ** Source code display:** ` mkdocstrings ` can add a collapsible div containing the highlighted source code
91+ - ** Source code display:** * mkdocstrings* can add a collapsible div containing the highlighted source code
7592 of the Python object.
7693
77- To get an example of what is possible, check ` mkdocstrings ` '
78- own [ documentation] ( https://pawamoy .github.io/mkdocstrings ) , auto-generated from sources by itself of course,
94+ To get an example of what is possible, check * mkdocstrings* '
95+ own [ documentation] ( https://mkdocstrings .github.io/ ) , auto-generated from sources by itself of course,
7996and the following GIF:
8097
8198![ mkdocstrings_gif2] ( https://user-images.githubusercontent.com/3999221/77157838-7184db80-6aa2-11ea-9f9a-fe77405202de.gif )
8299
83100## Roadmap
84101
85- See the [ Feature Roadmap issue] ( https://github.com/pawamoy /mkdocstrings/issues/183 ) on the bugtracker.
102+ See the [ Feature Roadmap issue] ( https://github.com/mkdocstrings /mkdocstrings/issues/183 ) on the bugtracker.
86103
87104## Requirements
88105
89- ` mkdocstrings ` requires Python 3.6 or above.
106+ * mkdocstrings* requires Python 3.6 or above.
90107
91108<details >
92109<summary >To install Python 3.6, I recommend using <a href =" https://github.com/pyenv/pyenv " ><code >pyenv</code ></a >.</summary >
@@ -141,10 +158,10 @@ plugins:
141158
142159In one of your markdown files:
143160
144- ` ` ` yaml
161+ ` ` ` markdown
145162# Reference
146163
147164:: : my_library.my_module.my_class
148165` ` `
149166
150- See the [Usage](https://pawamoy .github.io/mkdocstrings /usage) section of the docs for more examples!
167+ See the [Usage](https://mkdocstrings .github.io/usage) section of the docs for more examples!
0 commit comments