Skip to main content

a base Pelican Plugin template.

Project description

travis-link codecov-link pypi-link

These are the bare minimum yet possibly over-explained steps for creating a Pelican plugin.

Steps

Please let us know in an issue if we forgot anything!

Copy Plugin Base

  1. Fork thedropin.

  2. Change all dir names and references to this project’s name[1]_.

Dependencies

See instructions for installing Pipenv. Then run pipenv install --dev.

Developing Your Plugin

This is now where you get to get 🎨 creative! Good luck, have fun.

ETC

This is wading into dangerous territory to start recommending text-editor practices, but if you open your editor from inside the Pipenv shell, that may help your editor loading the proper environment-specific dependencies.

Tests

  1. pipenv run tests

Linting

  1. pipenv run lints

Sharing

Two great ways to share your code with the community.

Pelican Plugins Community Repo

See Contributing a plugin and Using Git and Github about adding a plugin to the pelican-plugins repo.

Publishing to PyPI

This is probably the hardest part, and is why I’d wager there are so few Pelican projects registered on PyPI[2]_. If you begin with the manual steps, I recommend migrating over to an automated way as soon as possible.

First Time

Your first time uploading a project to PyPI requires registration via Twine.

  1. pipenv shell Enter your dev environment where twine will be accessible.

  2. python setup.py sdist bdist_wheel Create a normal distribution.

  3. Register on PyPI.

  4. Think hard on your project name once more before uploading. Short lowercase 1 word names are best.

Optionally, you can do some checks on your distribution before attempting an official upload.

  1. Also register on TestPyPI if you intend to test your distribution before making it official.

  2. twine check dist/* Check the distribution you made in step 2.

  3. twine upload --repository testpypi dist/* Run a test of the upload. Preview at https://test.pypi.org/project/thedropin.

Back to the official upload steps..

  1. Upload your project to PyPI.

Continue below!

Automated Release to PyPI

(TODO: left off here)

After you’ve found your groove with this; Give yourself a pat on the back. Job well done.

You wont be needing Twine any more. Please feel free to uninstall with pipenv uninstall twine.

References

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thedropin-0.0.4.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

thedropin-0.0.4-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page