danielfrg / pelican-jupyter

Pelican plugin for blogging with Jupyter/IPython Notebooks
Apache License 2.0
422 stars 105 forks source link

Create setup.py with package structure #120

Closed schneiderfelipe closed 4 years ago

schneiderfelipe commented 4 years ago

This allows one to install the plugin as a regular package:

$ pip install -e .
danielfrg commented 4 years ago

Thanks! How would this look in the pelicanconf.py? Would you still have to download this project into plugins? I remember that was the only way I was able to make it work.

schneiderfelipe commented 4 years ago

How would this look in the pelicanconf.py? Would you still have to download this project into plugins?

No need! After installing with pip, you'll be able to add the plugin directly to PLUGINS. Mine looks like

PLUGINS = ["extended_sitemap", "pelican_cite", "ipynb.markup", "pelican_shortener"]

The pelican-ipynb folder can be anywhere in your computer since the -e option of pip will symlink to it from somewhere like /usr/local/lib/python3.6/dist-packages/ (that's the path in my computer).

By the way, this PR allows you to upload this project to PyPI.

danielfrg commented 4 years ago

Got it. I thought having it in the plugins directory was needed, i think i tried this at one point. I will merge and I will push to PyPI when I got some free time. Thanks!

danielfrg commented 4 years ago

You can find this now on PyPI: https://pypi.org/project/pelican-jupyter/