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.1.tar.gz (8.2 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.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mkdocs_ipynb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0bc8791e98e0aec305d7e640b51f17794ddf20ead72f93f894e1951ec5524a16
MD5 4b8693ea176c2ec3f2c3f498721d94f3
BLAKE2b-256 68b6091efeb0a58031e31e72fbedfedf7832e466e1275e191e875f05abfad68a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mkdocs_ipynb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dae68bd4e9b6581a1d1a102c447c921cd0c43b23712137ca80a31e0f9f70e4c1
MD5 85fb6b8249f0012b44d440604ed67177
BLAKE2b-256 6c0176473cd0e3d06a30865a1aece673d9854381cc26e139cd38100ccca3e18f

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