Skip to main content

No project description provided

Project description

mkdocs-jupyter: Use Jupyter Notebooks in mkdocs

PyPI Testing Coverage Status License

  • Add Jupyter Notebooks directly to the mkdocs navigation
  • Feel and look the regular Jupyter Notebook style inside mkdocs pages
  • Option to execute the notebook before converting
  • Show ipywidgets (requires execution of the notebook)
  • Support for mkdocs TOC
  • Include notebook source

mkdocs-jupyter default theme mkdocs-jupyter material theme

Usage

pip install mkdocs-jupyter

In your mkdocs.yml:

nav:
- Notebook: notebook.ipynb

plugins:
  - mkdocs-jupyter

Options

Execute Notebook

You can tell the plugin to execute the notebook before converting, default is False:

plugins:
  - mkdocs-jupyter:
      execute: True

Download notebook link

You can tell the plugin to include the notebook source to make it easy to show a download button in the theme, default is False:

plugins:
  - mkdocs-jupyter:
      include_source: True

This setting will also create a page.nb_url value that you can use in your theme to make a link in each page.

For example in mkdocs-material (see customization), you can create a main.html file like this:

{% extends "base.html" %}

{% block content %}
{% if page.nb_url %}
    <a href="{{ page.nb_url }}" title="Download Notebook" class="md-content__button md-icon">
        {% include ".icons/material/download.svg" %}
    </a>
{% endif %}

{{ super() }}
{% endblock content %}

With this result:

Download Noteboon button

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-jupyter-0.13.0.tar.gz (1.7 MB view details)

Uploaded Source

File details

Details for the file mkdocs-jupyter-0.13.0.tar.gz.

File metadata

  • Download URL: mkdocs-jupyter-0.13.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for mkdocs-jupyter-0.13.0.tar.gz
Algorithm Hash digest
SHA256 304d0a511159e1414663a1ef1f3a751860251e65a021c305351474ada7520475
MD5 a6b7abc2edd84d749d5656c5de9deec5
BLAKE2b-256 0f0d2cb9afa26ad4c3437bf3a3e43eb41c479e7770acdc0b07faaacaf6bfe389

See more details on using hashes here.

Supported by

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