diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 0559f393bd0..2f34ab8bf36 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -18,6 +18,8 @@ dependencies: - iris - jupyter_client - jupyter_sphinx + - jupyterlite-sphinx + - jupyterlite-pyodide-kernel - matplotlib-base - nbsphinx - ncdata diff --git a/doc/conf.py b/doc/conf.py index 4c1c7482247..f9c32140ed8 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -73,6 +73,7 @@ "sphinx_design", "sphinx_inline_tabs", "sphinx_remove_toctrees", + "jupyterlite_sphinx", ] @@ -181,9 +182,13 @@ "pd.Index": "~pandas.Index", "pd.NaT": "~pandas.NaT", } - autodoc_type_aliases = napoleon_type_aliases # Keep both in sync +# jupyterlite try_examples config +global_enable_try_examples = True +try_examples_global_button_text = "Try it in your browser!" +try_examples_global_warning_text = "Interactive examples are experimental and may not always work as expected." + # mermaid config mermaid_version = "10.9.1" @@ -214,7 +219,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ["_build", "**.ipynb_checkpoints"] +exclude_patterns = ["_build", "**.ipynb_checkpoints", "_contents"] # The name of the Pygments (syntax highlighting) style to use. diff --git a/doc/try_examples.json b/doc/try_examples.json new file mode 100644 index 00000000000..47b9a700048 --- /dev/null +++ b/doc/try_examples.json @@ -0,0 +1,3 @@ +{ + "global_min_height": "400px" +}