Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions docs/content/launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
# Launch buttons for interactivity

You can automatically add buttons that allow users to interact with your
book's content. This is either by directing them to a BinderHub or JupyterHub
that runs in the cloud, or by making your page interactive using Thebe.
book's content. This is can be by directing them to
a [JupyterLite](https://jupyterlite.readthedocs.io) installation (that runs in
the user's browser) or one of BinderHub or JupyterHub (that runs in the
cloud), or by making your page interactive using Thebe.

To use either Binder or JupyterHub links, you'll first need to configure your
documentation's repository url:
To use any of JupyterLite or Binder or JupyterHub links, you'll first need to
configure your documentation's repository url:

```python
html_theme_options = {
Expand All @@ -26,6 +28,28 @@ folder as your content, then Binder/JupyterHub links will point to the ipynb
file instead of the text file.
```

## JupyterLite

If you are adding JupyterLite links to your page, first work out where your
JupyterLite instance will be serving from, then add the URL to your
configuration. In the example below, we've set up JupyterLite pages at the
base URL of the main pages site, and at subdirectory `interact/lab`:

```python
html_theme_options = {
...
"launch_buttons": {
"jupyterlite_url": "interact/lab/index.html"
},
...
}
```

See <https://odsti.github.io/cfd-textbook> for an example
[JupyterBook](https://jupyterbook.org) project serving JupyterLite using this
configuration, and <https://github.com/odsti/cfd-textbook> for the driving
repository.

## Binder / BinderHub

To add Binder links to your page, add the following configuration:
Expand Down
Loading