Skip to article content

MyST allows you to directly include Jupyter Notebooks in your books, documents and websites. This page of the documentation is actually a Jupyter Notebook that is rendered directly using MyST.

For example, let us import altair and create a demo of an interactive plot!

import altair as alt
from vega_datasets import data

source =
brush = alt.selection_interval(encodings=['x'])
points = alt.Chart(source).mark_point().encode(
    color=alt.condition(brush, 'Origin:N', alt.value('lightgray'))

bars = alt.Chart(source).mark_bar().encode(

We can now plot the altair example, which is fully interactive, try dragging in the plot to select cars by their horsepower.

points & bars

Including your notebookΒΆ

If you are working with Jupyter *.ipynb files, just move your notebooks into the project folder or list them in your table of contents to get them to show up in your website or as a document. myst will then include your notebook in parsing, and show the full results as soon as you save your notebook, including any interactive figures.

To customize the title and other frontmatter, ensure the first Jupyter Notebook cell is a markdown cell, and only includes a YAML frontmatter block (i.e. surrounded in ---).

MyST MarkdownMyST Markdown
Community-driven tools for the future of technical communication and publication