No project description provided
Project description
Mkdocs-Ipymd
Mkdocs plugin for Interactive Python
This plugin allows you to use python, in VSCode interactive fashion, to create docs. The motivation was having a way to create interactive examples in the documentation, without increasing the git repository size.
Installation
pip install mkdocs-ipymd
or with poetry:
poetry add mkdocs-ipymd
Usage
1. Add the plugin to your mkdocs.yml
:
plugins:
- ipymd
2. Create a python file ".py" or ".ipy" in the docs
folder:
And use the following syntax to include the file in your markdown:
# %%
import numpy as np
import matplotlib.pyplot as plt
# %%
msg = "Hello World"
print(msg)
# %%
msg = "Hello not again"
print(msg)
# %% [markdown]
## This is a markdown cell
### With some content
And some math
$$
E = mc^2
$$
The # %%
is a cell separator, and the content of the cell is executed as python code.
3. Add the file to your mkdocs.yml
nav (optional)
nav:
- Home: index.md
- Examples:
- file1.md
- file2.md
Important: you must add the file with ".md" extension, even if the file is a python file.
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_ipymd-0.0.3.tar.gz
(8.1 kB
view details)
Built Distribution
File details
Details for the file mkdocs_ipymd-0.0.3.tar.gz
.
File metadata
- Download URL: mkdocs_ipymd-0.0.3.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.8 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75e629ba014869e2972a9daa2f583807d43e92bee75daf009f7d7893b446b73d |
|
MD5 | 4d81fa340ea455080038ba8aef9d388f |
|
BLAKE2b-256 | ac1e41b9afa9df268b324bd3b6bdfeb03dc4588f39665fcc2014eb55c168fa5e |
File details
Details for the file mkdocs_ipymd-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_ipymd-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.8 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de9ed696619eb9c99537ba000673734951ae358fd5750851fee699ef6fbcbcf7 |
|
MD5 | 695a719607f9fe033ce50bb8217f1aaa |
|
BLAKE2b-256 | 70c241560e9d6c3e4519a9c266611ccc1a5ccefbe983317498a3a9854e27a9a2 |