No project description provided
Project description
mkdocs-jupyter: Use Jupyter Notebooks in mkdocs
- 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
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:
Project details
Release history Release notifications | RSS feed
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 hashes)