Feature: Add doc for plugin-system

This commit is contained in:
winkidney
2020-05-08 00:30:28 +08:00
parent 5a102dfce4
commit 023a8ad824
2 changed files with 21 additions and 0 deletions

20
docs/src/plugin-system.md Normal file
View File

@@ -0,0 +1,20 @@
# Pinry, the open-source tiling image board.
New plugin system is under development.
Now you could access it via project example plugin file `pinry_plugins/batteries/plugin_example.py`.
You could create a simple plugin which has a class which owns methods named:
+ process_image_pre_creation
+ process_thumbnail_pre_creation
And, add the plugin class to local_settings.py as:
```
ENABLED_PLUGINS = [
'pinry_plugins.batteries.plugin_example.Plugin',
]
```
Now the plugin will work like a charm!

View File

@@ -19,6 +19,7 @@ nav:
- Theories: 'theories.md' - Theories: 'theories.md'
- Install with Docker: 'install-with-docker.md' - Install with Docker: 'install-with-docker.md'
- Development: 'development.md' - Development: 'development.md'
- Development: 'plugin-system.md'
- Docs: 'docs.md' - Docs: 'docs.md'
- Passwords: 'passwords.md' - Passwords: 'passwords.md'
- Assets: 'assets.md' - Assets: 'assets.md'