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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_ipymd-0.0.4.tar.gz.
File metadata
- Download URL: mkdocs_ipymd-0.0.4.tar.gz
- Upload date:
- Size: 8.5 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 |
24108e7611d16ecb1fd919531924aa2d83b2cd331fbed43c8f628d4b632dc7b7
|
|
| MD5 |
60216c1c4949576040b1a358bfa1d1b3
|
|
| BLAKE2b-256 |
a3cef15e7389ca253aab6702235d8b4835eb2ff3946ae16a3e2839ebd79ef5cd
|
File details
Details for the file mkdocs_ipymd-0.0.4-py3-none-any.whl.
File metadata
- Download URL: mkdocs_ipymd-0.0.4-py3-none-any.whl
- Upload date:
- Size: 10.4 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 |
18fd7b4a6b6e6c7b5777aab232ae9f545a382d09dace4903e054ee502d073299
|
|
| MD5 |
c05da03fc6752891dc4be9d68763111c
|
|
| BLAKE2b-256 |
5a0a97caa548942b9813a381cadc3c03e31f31c016ed67d929d4b7c44d890b93
|