Skip to main content

pelican-jupyter-reader: A Plugin for Pelican

PyPI version Netlify Status

This Pelican plugin provides a Jupyter Notebook (i.e. *.ipynb) reader. The plugin intends to allow users to simply drop Jupyter notebooks in their Pelican content directory and have the notebooks rendered (beautifully) in a Pelican static website.

Installation

This plugin can be installed via:

pip install pelican-jupyter-reader

Quickstart

  • Add the plugin to pelicanconf.py:
# ...

from pelican.plugins import pelican_jupyter_reader
PLUGINS = [pelican_jupyter_reader]

# ...
{
    "pelican": {
        "date": "2020-04-10",
        "title": "this is a title",
        "tags": "thats, awesome",
        "category": "yeah",
        "slug": "my-super-post",
        "authors": "Alexis Metaireau, Conan Doyle",
        "summary": "Short version for index and feeds"
    },
    "kernelspec": {
        "display_name": "Python 3",
        "language": "python",
        "name": "python3"
    },
//...the rest of the notebook JSON follows.
  • Drop your Jupyter notebook in the Pelican content directory, build your site, and deploy! :rocket:

Example

The demo/ directory has a simple post with corresponding configuration in pelicanconf.py. The demo site is deployed here.

Notes

The Jupyter nbconvert configuration for preprocessors and the HTMLExporter are exposed in your Pelican config, pelicanconf.py. This means you can manipulate notebooks with utilities provided by nbconvert.

For example, to use the basic template for the HTMLExporter, you could add the following to your pelicanconf.py:

from traitlets.config import Config
NBCONVERT_CONFIG = Config()
NBCONVERT_CONFIG.HTMLExporter.template = 'basic'

To strip empty cells from the notebook before publishing, you might add this option to pelicanconf.py:

# ...
NBCONVERT_CONFIG.RegexRemovePreprocessor.patterns = ['\\s*\\Z']

Other nbconvert configuration options can be found here.

Metadata

Release files for pelican-jupyter-reader 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pelican-jupyter-reader 0.3.1
File Size Uploaded Provenance
pelican-jupyter-reader-0.3.1.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pelican-jupyter-reader 0.3.1
File Interpreter ABI Platform
pelican_jupyter_reader-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / pelican-jupyter-reader-0.3.1.tar.gz

Download URL pelican-jupyter-reader-0.3.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8feda86b81698fcae652b787c9771087b3488a70488072f5db9b7bf6bada467e
BLAKE2b-256 checksum
How to use checksums
e795e08b899c02288b75f6f14f690d16baed5d57eae8e470e13834d5c11cd854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.2 Darwin/18.7.0

Release files / pelican_jupyter_reader-0.3.1-py3-none-any.whl

Download URL pelican_jupyter_reader-0.3.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b054c01fc476ab83dcb79a8a31eabececacf74eb77a6b46163bf9e4d1518b75d
BLAKE2b-256 checksum
How to use checksums
013330a536d90f8c1445b1a04d78207578dde74fadf4d2e316881c7d523332c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.2 Darwin/18.7.0

Security for pelican-jupyter-reader 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page