Plugin for mkdocs to generate markdown documents from jupyter notebooks.
Project description
mknotebooks
mknotebooks is a plugin for MkDocs, which makes it more convenient to include Jupyter notebooks in your project documentation.
Install
pip install mknotebooks
Usage
Simply include any notebooks you want to use in the docs source directory, and add mknotebooks to the plugin section of your mkdocs.yml
.
You can optionally execute the notebooks, by setting execute: true
in the config, and include a hidden preamble script, to be run before executing any cells using preamble: "<path/to/your/script>"
. The default cell execution timeout can be overridden by setting timeout: <timeout>
, where <timeout>
is an integer number of seconds.
Any static images, plots, etc. will be extracted from the notebook and placed alongside the output HTML.
Example
An example docs project demonstrating the above is included. Try it out by running pipenv install && pipenv run mkdocs serve
.
Inspecting generated markdown
You can also export the generated markdown by setting write_markdown: true
in your mkdocs.yml
. This will write the generated markdown to a .md.tmp
file alongside the original notebook.
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 Distributions
Built Distribution
Hashes for mknotebooks-0.1.16.post0.dev11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de613a1a76c77432d972018b54d9c9acb223ac9086b03d0efd5b614387c8950c |
|
MD5 | 8070676898b9779183475a4160e7f409 |
|
BLAKE2b-256 | 4016a00ca0368a7fa600fd66fad73f1961f69a45feaedb42f874bd2e9ef1ab12 |