Contributing.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Contributing a plugin
  2. =====================
  3. Details regarding how to write a plugin are explained in the Pelican `docs`_.
  4. If you want to contribute, **please be sure** to read our general contributing
  5. `guidelines`_ first. Then you can fork this repository, create a new branch,
  6. make your changes, squash your commits, and issue your pull request from your
  7. new branch (i.e., **not** the ``master`` branch).
  8. Make sure that your plugin follows the structure below::
  9. my_plugin
  10. ├── __init__.py
  11. ├── my_plugin.py
  12. ├── test_my_plugin.py
  13. └── ReadMe.rst / ReadMe.md
  14. ``my_plugin.py`` is the actual plugin implementation. Include a brief
  15. explanation of what the plugin does as a module docstring. Put any further
  16. explanations and usage details into the ``ReadMe`` file.
  17. ``__init__.py`` should contain a single line with ``from .my_plugin import *``.
  18. Place tests for your plugin in the same folder inside ``test_my_plugin.py``.
  19. If you need content or templates in your tests, you can use the main
  20. ``test_data`` folder for that purpose.
  21. **Note:** Each plugin can contain a LICENSE file stating the license it's
  22. released under. If there is an absence of LICENSE then it defaults to the
  23. *GNU AFFERO GENERAL PUBLIC LICENSE Version 3*. Please refer to the ``LICENSE``
  24. file for the full text of the license.
  25. Before making your initial commit, please be sure to add an entry to the repo's
  26. top-level ``ReadMe`` file, adding your plugin to the list (in alphabetical
  27. order) and providing a brief description.
  28. .. _guidelines: http://docs.getpelican.com/en/latest/contribute.html#using-git-and-github
  29. .. _docs: http://docs.getpelican.com/en/latest/plugins.html#how-to-create-plugins