This is a MkDocs plugin for linking to API documentation generated by
pdoc from mkdocs
.
This plugin is inspired by https://github.com/Kobzol/mkdocs-nedoc-plugin
-
Install
mkdocs-pdoc-plugin
$ python3 -m pip install git+https://github.com/spirali/mkdocs-pdoc-plugin
-
Generate documentation with
pdoc
into directory with mkdoc's markdown files.$ pdoc mypackage -o docs/<PATH_TO_API>
-
Configure plugin in
mkdocs.yaml
plugins: - pdoc: api_path: <PATH_TO_API>
api_path
has to be a relative path where to find generated documentation in the documentation directory. -
Link to code in
mkdocs
documentation. Link has to start with "pdoc:"The [MyClass](pdoc:mypackage.MyClass) class is awesome. The [do_something](pdoc:mypackage.MyClass.do_something) method is awesome.
You can omit title:
The [](mypackage.MyClass) class is awesome.
and the last part of the name will be used as the title (
MyClass
in this case)