Skip to main content

No project description provided

Project description

Mkdocs-Ipymd

PyPI version codecov

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.2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

mkdocs_ipymd-0.0.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_ipymd-0.0.2.tar.gz.

File metadata

  • Download URL: mkdocs_ipymd-0.0.2.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.8 Darwin/23.6.0

File hashes

Hashes for mkdocs_ipymd-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0e1184c53377089639c805e39cf6f45488c8733db768c1235b1fb815c487505a
MD5 d549a68f7a35032f6c6747abff07867f
BLAKE2b-256 861835776509a673fc6ff8f7f34d657a73926a1d1602432c69dfc848718b1586

See more details on using hashes here.

File details

Details for the file mkdocs_ipymd-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_ipymd-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 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

Hashes for mkdocs_ipymd-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b953d9d21741a864d469f88601a47eec3d7ecf15d0731cdb7734fa97bb6946f
MD5 a33897f64720cc329751ce944830eeb3
BLAKE2b-256 dbf0104fade95fbfa6536c82196aec77506eee2ade9f04118d4a31a446b34414

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page