mkdocs-protobuf

Mkdocs plugin to render protobuf messages


Keywords
mkdocs_protobuf, mkdocs, protobuf
License
Apache-2.0
Install
pip install mkdocs-protobuf==0.1.0

Documentation

Mkdocs Protobuf plugin

build codecov PyPI version


Source Code: https://github.com/rymurr/mkdocs_protobuf


This plugin inserts protobuf messages into template parameters in mkdocs websites. It can be used to embed Protobuf IDL into documentation sites.

Usage

To use in mkdocs install via pip pip install mkdocs_protobuf.

Add the following to mkdocs.yml

plugins:
 - mkdocs_protobuf:
     proto_dir: /path/to/proto/files

The plugin will search for any templataes like the following: %%% proto.message.MessageName %%% and will replace the template with the protobuf message MessageName. See the tests directory for an example. The escape characters are odd as to not interfere w/ Jinja2 templating from other plugins.

Development

Setup environement

You should have Pipenv installed. Then, you can install the dependencies with:

pipenv install --dev

After that, activate the virtual environment:

pipenv shell

Run unit tests

You can run all the tests with:

make test

Alternatively, you can run pytest yourself:

pytest

Format the code

Execute the following command to apply isort and black formatting:

make format

License

This project is licensed under the terms of the Apache Software License 2.0.