An open API service indexing awesome lists of open source software.

https://github.com/spirali/mkdocs-pdoc-plugin


https://github.com/spirali/mkdocs-pdoc-plugin

Last synced: over 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# mkdocs-pdoc-plugin

This is a [MkDocs](https://www.mkdocs.org/) plugin for linking to API documentation generated by
[pdoc](https://pdoc.dev/) from `mkdocs`.

This plugin is inspired by https://github.com/Kobzol/mkdocs-nedoc-plugin

# Usage
1) Install `mkdocs-pdoc-plugin`

```commandline
$ python3 -m pip install git+https://github.com/spirali/mkdocs-pdoc-plugin
```

2) Generate documentation with `pdoc` into directory with mkdoc's markdown files.

```commandline
$ pdoc mypackage -o docs/
```

3) Configure plugin in `mkdocs.yaml`

```yaml
plugins:
- pdoc:
api_path:
```

`api_path` has to be a relative path where to find generated documentation in the documentation directory.


4) 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)