This is a template for a MkDocs plugin.
You can generate your own plugin by the following command.
bash generate_template.sh ${PLUGIN_NAME} ${PLUGIN_CLASS_NAME}
TODO:
Install your plugin by the following command:
cd ${GENERATED_PLUGIN_DIR}
python3 setup.py install
Activate the plugin in mkdocs.yml:
NOTE:
If you use - charactre in ${PLUGIN_NAME}, it will be replaced to '_' charactor.
This is becase of python module naming rule.
plugins:
- search
- ${PLUGIN_NAME}I have confirmed that it works in the following environment.
| version | |
|---|---|
| python | 3.6 - 3.9 |
| mkdocs | 1.1 |
If you want to create a plugin for another mkdocs version, checkout the corresponding tag.
- plugins.md
This is user-guide for plusings. - plugins.py
Mkdocs defines the events for plugins in this file.