Skip to main content

A simple ipynb->md converter for MkDocs

Project description

mkdocs-ipynb

Lighweight MkDocs plugin for loading Jupyter notebooks.

Interoperates with all other MkDocs features: admonitions, reference links, etc.

Installation

pip install mkdocs_ipynb

Requires MkDocs 1.6.1+

Usage

In mkdocs.yml:

...

plugins:
    - ipynb

nav:
    - some_notebook.ipynb

Under-the-hood it will be converted into markdown and then passed to MkDocs.

Other similar libaries

  • mkdocs-jupyter converts Jupyter notebooks directly into HTML using nbconvert. It doesn't support admonitions, reference links (e.g. to mkdocstrings references), etc.
  • mknotebooks also uses nbconvert. It has since fallen out of date with modern MkDocs.

Due to these limitations I wrote my own tiny plugin.

Further work?

Jupyter cells can output many kinds of MIME types (text/plain, image/png, ...). It's fairly trivial to add support for them; right now we support just text/plain and image/png because those are my use-cases. Happy to take PRs extending this if you have use-cases for others.

This plugin doesn't use nbconvert, mainly because that in turn depends on many other libraries, and I object to that kind of dependency sprawl.

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

mkdocs_ipynb-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_ipynb-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_ipynb-0.1.0.tar.gz.

File metadata

  • Download URL: mkdocs_ipynb-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for mkdocs_ipynb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 85934ddc45fdf848665ba721b7cc50126fc29418875fc2588590f65eac20633e
MD5 b6ddda2f805390469ac1b99a6738f486
BLAKE2b-256 62de0c1fbe6ddefe8a5fb41a656f9976d487207f7dccb61dd005944e28c32c71

See more details on using hashes here.

File details

Details for the file mkdocs_ipynb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_ipynb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for mkdocs_ipynb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2f40a95d9b517c616fe70aa01e0f805b521fe77576baa0f8e8086493ea1f010
MD5 7b31387425aa6b2e5d6a6f388928bb88
BLAKE2b-256 190be073aa72a8e26f87eab5340df846f61cdf70746b40ac4593de8f7c4a344b

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