Skip to content

Commit 2ef72e4

Browse files
Backport PR #1899: Switch tutorials to myst-nb (#1904)
Co-authored-by: Philipp A <flying-sheep@web.de>
1 parent 65175a0 commit 2ef72e4

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

docs/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# default settings
2929
templates_path = ["_templates"]
3030
html_static_path = ["_static"]
31-
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
31+
source_suffix = {".rst": "restructuredtext", ".md": "myst-nb"}
3232
master_doc = "index"
3333
default_role = "literal"
3434
exclude_patterns = [
@@ -44,7 +44,7 @@
4444
pygments_style = "sphinx"
4545

4646
extensions = [
47-
"myst_parser",
47+
"myst_nb",
4848
"sphinx_copybutton",
4949
"sphinx.ext.autodoc",
5050
"sphinx.ext.intersphinx",
@@ -60,15 +60,17 @@
6060
"sphinxext.opengraph",
6161
"scanpydoc", # needs to be before linkcode
6262
"sphinx.ext.linkcode",
63-
"nbsphinx",
6463
"IPython.sphinxext.ipython_console_highlighting",
6564
"sphinx_toolbox.more_autodoc.autoprotocol",
6665
*(p.stem for p in _extension_dir.glob("*.py")),
6766
]
6867
myst_enable_extensions = [
6968
"html_image", # So README.md can be used on github and sphinx docs
69+
"colon_fence",
70+
"dollarmath",
7071
]
7172
myst_heading_anchors = 3
73+
nb_execution_mode = "off"
7274

7375
# Generate the API documentation when building
7476
autosummary_generate = True

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ doc = [
7171
"sphinx-copybutton",
7272
"sphinx-toolbox>=3.8.0",
7373
"sphinxext.opengraph",
74-
"nbsphinx",
74+
"myst-nb",
7575
"scanpydoc[theme,typehints] >=0.15.1",
7676
"zarr<3",
7777
"awkward>=2.3",

0 commit comments

Comments
 (0)