MkDocs-Jupyter Plugin

0.26.2 · active · verified Tue Apr 14

mkdocs-jupyter is an MkDocs plugin that enables the seamless integration of Jupyter notebooks (.ipynb files) and Jupytext-generated Python scripts (.nb.py files) directly into your MkDocs documentation. It allows for rendering notebooks, optionally executing them during the build process, supports theme integration, and offers granular control over the visibility of notebook cells and outputs using tags. The current stable version is 0.26.2, with active development and regular updates.

Warnings

Install

Quickstart

To use mkdocs-jupyter, you primarily configure it in your `mkdocs.yml` file under the `plugins` section. After installation, create a `docs` directory with your markdown (`.md`), Jupyter notebooks (`.ipynb`), or Jupytext Python scripts (`.py`). Reference these files in your `nav` configuration. Ensure you have a basic `index.md` for your homepage.

site_name: My Docs

nav:
  - Home: index.md
  - My Notebook: notebooks/example.ipynb
  - My Python Script: notebooks/script.py

plugins:
  - search
  - mkdocs-jupyter:
      execute: true  # Optional: Execute notebooks during build
      include_source: true # Optional: Add download link for source notebooks
      kernel_name: python3 # Optional: Specify kernel to use for execution

view raw JSON →