Notebook-Ready Tutorial Export¶
This workflow converts tutorial markdown pages under docs/tutorials/ into notebook-ready artifacts.
Outputs are written to out/jupyter-notebook/:
index.jsonwith per-page conversion summarymanifests/*.cells.jsoncontaining explicit markdown/python/shell cell sequencesnotebooks/*.ipynbscaffold notebooks for immediate rendering
Why This Exists¶
- Keep tutorial source-of-truth in markdown docs.
- Support future publication as Jupyter-based tutorial websites.
- Preserve runnable command snippets as explicit shell notebook cells.
Commands¶
Export full notebook-ready bundle:
Check conversion integrity without writing outputs:
Inspect one generated notebook:
python -m json.tool out/jupyter-notebook/notebooks/tutorial_integrated_debug_to_release.ipynb > /dev/null
Conversion Rules¶
- Regular markdown stays markdown cells.
- Fenced
python/pyblocks become code cells. - Fenced
bash/sh/zsh/shellblocks become%%bashcode cells. - Unknown fenced languages are preserved as markdown blocks.
Typical Use In Content Iteration¶
- Update tutorial docs (
docs/tutorials/*.md). - Run
pixi run export-notebook-ready. - Spot-check generated notebook(s).
- Use
out/jupyter-notebook/as input for downstream publishing pipelines.