Skip to main content

Convert Jupyter Notebooks to Jekyll-ready Markdown files

Project description

JekyllNB: Jupyter Notebooks to Jekyll Markdown

Test Status Documentation Status Coverage Status PyPI Version Dependabot Status License Code Style

JekyllNB extends Jupyter's command line tool nbconvert to add the Jekyll header to Markdown files and save generated images to a desired location. This allows you to easily convert all your notebooks to the required format and immediately build your Jekyll site.

Installation

JekyllNB is available on PyPI and can be installed with pip.

pip install jekyllnb

Usage

JekyllNB is a Jupyter app just like nbconvert. Call it with jupyter jekyllnb. The preprocessor reads metadata from your notebook to populate the Jekyll header. Add a jekyll section to your notebook metadata similar to:

"jekyll": {
    "layout": "notebook",
    "permalink": "/hello/",
    "title": "Hello World!"
}

The exporter will add the following header to the generated Markdown:

---
layout: notebook
permalink: /hello/
title: Hello World!
---

Options

Since jekyllnb extends nbconvert, all existing options are supported. The following new options are available:

  • --site-dir: Root directory of your Jekyll site. Markdown (page-dir) and image (image-dir) folders will be created here if they do not exist.
  • --page-dir: Directory for generated Markdown files (e.g. _pages or _posts).
  • --image-dir: Directory for images. Images are organized into folders for each notebook by default. Alias for the nbconvert option NbConvertApp.output_files_dir.
  • --no-auto-folder: Flag to turn off the default behavior of organizing images by notebook name within image-dir. (default: false)

nbconvert

JekyllNB also supports nbconvert by registering an entry point for the exporter. You can use the Jekyll exporter with nbconvert by calling jupyter nbconvert --to jekyll.

Note: The options above are not available with nbconvert.

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

jekyllnb-0.1.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jekyllnb-0.1.1-py2.py3-none-any.whl (7.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file jekyllnb-0.1.1.tar.gz.

File metadata

  • Download URL: jekyllnb-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.8.0 Linux/5.0.0-1027-azure

File hashes

Hashes for jekyllnb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9bcc37a93e200b3ba12a21a258df606db6c7fdab98f3a324fbe29a2e1a0f7387
MD5 cae6586d57fb889234dc825c86ee1be7
BLAKE2b-256 298eeed2af095ab79850b7eab9d8aeae342edac11e1ff99523fd46fad24a6981

See more details on using hashes here.

File details

Details for the file jekyllnb-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: jekyllnb-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.8.0 Linux/5.0.0-1027-azure

File hashes

Hashes for jekyllnb-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4cc9557a53bafcea5bdbf9923c2df402bf4bcf26d89b35572f08aa6f3e273a3b
MD5 166685a7d2a0f43b7ad1ffe0b47f619b
BLAKE2b-256 c738fe448c91e3e26ad41f4f9261f67cd938de35425c23d1581568b0e2885f83

See more details on using hashes here.

Supported by

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