Launch into interactive computing interfaces
Launch into interactive computing interfaces¶
Because Jupyter Books are built with Jupyter notebooks, you can allow users to launch live Jupyter sessions in the cloud directly from your book. This lets readers quickly interact with your content in a traditional coding interface. They do so by clicking a Launch Button that takes them to an interactive environment.
There are numerous online notebook services - a good comparison is provided in this article - and the following sections describes the available integrations provided by Jupyter Book.
Control the notebook interface that opens¶
Binder and JupyterHub sessions can be opened using either the “classic” Jupyter Notebook or the new JupyterLab interface backend (see jupyter.org for more details). This is configured using:
launch_buttons: notebook_interface: "jupyterlab" # or "classic"
One thing to take into account when choosing the interface is that notebooks written in the MyST Markdown text-based format will not be opened as notebooks out-of-the-box.
If you wish for these files to be opened as notebooks then firstly you must ensure that
jupytext>=0.16 is installed in the Binder/JupyterHub environment for your book (no support for this feature exists in Google Colab).
You then have two options:
Use the “classic” interface, which will then immediately open these files as notebooks.
The “jupyterlab” interface (at the time of writing) has not yet implemented this behaviour, and so you will need to instruct readers to right-click the Markdown file and click “Open in notebook editor”.