Notebooks in the blog
A quick demo of rendering Jupyter notebooks directly in blog posts.
This post demonstrates rendering a Jupyter notebook inline. The notebook is parsed at build time — cells, outputs, and all.
Quick demo This is a placeholder notebook to verify the renderer works.
Show code
In [1]:
import pandas as pd
df = pd.DataFrame({
'name': ['Alice', 'Bob', 'Charlie'],
'score': [92, 87, 95]
})
df | name | score | |
|---|---|---|
| 0 | Alice | 92 |
| 1 | Bob | 87 |
| 2 | Charlie | 95 |
Show code
In [2]:
print(f'Mean score: {df["score"].mean():.1f}') Mean score: 91.3
That’s it. Drop an .ipynb file in the notebooks folder, import the component in an MDX post, and the cells render with syntax highlighting and output.