Sphinx Doc - Include Jupyter Notebook¶
Keywords: Sphinx Doc, Jupyter Notebook, Jupyter Lab, JupyterNotebook, JupyterLab
Summary¶
介绍如何在 Sphinx Doc 文档中嵌入 Jupyter Notebook.
Install nbsphinx.
Add extension to your sphinx doc
conf.py
file.
extensions = [
"nbsphinx",
]
Include notebook in RestructuredText.
.. toctree::
:maxdepth: 2
:caption: Contents:
notebooks/Example 1
Make sure you add
IPython
to yourrequirements-doc.txt
file, otherwise the Sphinx Doc cannot show Syntax Highlight in Code Block.
Reference: