Package: thedropin
These are the bare minimum yet possibly over-explained steps for creating a Pelican plugin.StepsPlease let us know in anissueif we forgot anything!Copy Plugin BaseForkthedropin.Change all dir names and references to this project’s name[1]_.[1]Python project names are typically short and lower-cased. If you make a single-word project, congrats, you never have to worry about inconsistent casing between projects. If you absolutely must use spacing, use underscores for project names, directories, and filenames.DependenciesSee instructions for installingPipenv. Then runpipenv install--dev.Developing Your PluginThis is now where you get to get 🎨 creative! Good luck, have fun.ETCThis 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.Testspipenv run testsLintingpipenv run lintsSharingTwo great ways to share your code with the community.Pelican Plugins Community RepoSeeContributing a pluginandUsing Git and Githubabout adding a plugin to thepelican-pluginsrepo.Publishing to PyPIThis is probably the hardest part, and is why I’d wager there are so few Pelican projects registered on PyPI[2]_. Begin with the manual steps. Afterwards, add support for the automated steps as soon as possible while everything is fresh in your head.[2]This is based on the following threeclassifiersearches. At the time of writing these are the tallies, with possible overlap between them;Framework :: Pelican(20 projects) +Framework :: Pelican :: Plugins(12 projects) +Framework :: Pelican :: Themes(5 projects) = 37.First TimeYour first time uploading a project to PyPI requires usingTwine. All of the below commands can be found in thePipfile[scripts]section for your convenience.pipenv shellEnter your dev environment wheretwinewill be accessible.python setup.py sdist bdist_wheelCreate a normal distribution.Registeron PyPI.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.Alsoregisteron TestPyPI if you intend to test your distribution before making it official.twine check dist/*Check the distribution you made in the second step.twine upload--repositorytestpypi dist/*Run a test of the upload. Preview athttps://test.pypi.org/project/thedropin.Back to the official upload steps..twine upload dist/*Upload your project to PyPI.Continue below before you’re tired!Automated Release to PyPIVisithttps://pypi.org/manage/account/token/to get your API token.Create a project-scoped token.gem install travisInstall the Travis CLI.travis loginLog into the CLI app. Use--comif you’ve opted into thehttps://travis-ci.com/beta.travis encrypt"your-api-token"--comOverride the token in this repo. Travis is migrating to Travis travis-ci.com.python ./release.pySave your changes and bump the version.Try bumping the version and tags again using the release script. After you’ve found your groove with this, give yourself a pat on the back. Job well done!InstallationThe installation instructions for your new plugin will now be the following.pipenv install--devthedropinupdate yourpelicanconf.py’s plugins settings to include the following.importthedropinPLUGINS=[thedropin]You can now include{{ article.emoji }}or{{ page.emoji }}in your templates. This can be overridden in the article, or page’s, metadata. For example,:emoji: 🧙.ReferencesContributing and feedback guidelinesHow to create pluginsContributing a pluginLicenseMIT