--- doc_id: diUoGPNCOIwO description: "Shows code output, cross-file links, admonitions and mermaid inside a notebook document. A Jupyter Notebook demo." tags: [sphinx, jupyter] source: "README.ipynb" --- # Jupyter Notebook A notebook is a document too: the file is `README.ipynb`, and the `doc_id` lives in the notebook `metadata`. MyST-NB builds it and parses Markdown cells as **MyST**, exactly like a `.md` document, with no pandoc. ## Running Code ```python import re bool(re.match(r"^[A-Za-z]{12}$", "diUoGPNCOIwO")) ``` ```text True ``` ## Cross-File Links and Directives A Markdown cell links to another document with {ref}`bhNtpbPvxMCO` and uses directives directly: :::{note} This note is written in an ordinary Markdown cell. ::: ```mermaid flowchart LR nb[README.ipynb] --> mystnb[MyST-NB] --> html[HTML] ``` :::{warning} Raw cells are not rendered (they are dropped, and the build does not warn). Write everything that needs Sphinx in Markdown cells. :::