File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,15 @@ Then you should be able to show Notebooks working with bqplot!
5959 .. retrolite:: bqplot.ipynb
6060
6161 .. retrolite :: bqplot.ipynb
62+
63+ Disable the ``.ipynb `` docs source binding
64+ ------------------------------------------
65+
66+ By default, jupyterlite-sphinx binds the ``.ipynb `` source suffix so that it renders Notebooks included in the doctree with JupyterLite.
67+ This is known to bring warnings with plugins like sphinx-gallery, or to conflict with nbsphinx.
68+
69+ You can disable this behavior by setting the following config:
70+
71+ .. code-block :: python
72+
73+ jupyterlite_bind_ipynb_suffix = False
Original file line number Diff line number Diff line change @@ -253,7 +253,8 @@ def inited(app: Sphinx, config):
253253 os .makedirs (os .path .join (app .srcdir , CONTENT_DIR ), exist_ok = True )
254254
255255 if (
256- ".ipynb" not in config .source_suffix
256+ config .jupyterlite_bind_ipynb_suffix
257+ and ".ipynb" not in config .source_suffix
257258 and ".ipynb" not in app .registry .source_suffix
258259 ):
259260 app .add_source_suffix (".ipynb" , "jupyterlite_notebook" )
@@ -334,6 +335,7 @@ def setup(app):
334335 app .add_config_value ("jupyterlite_config" , None , rebuild = "html" )
335336 app .add_config_value ("jupyterlite_dir" , None , rebuild = "html" )
336337 app .add_config_value ("jupyterlite_contents" , None , rebuild = "html" )
338+ app .add_config_value ("jupyterlite_bind_ipynb_suffix" , True , rebuild = "html" )
337339
338340 # Initialize RetroLite and JupyterLite directives
339341 app .add_node (
You can’t perform that action at this time.
0 commit comments