JupyterLite-sphinx can be configured in your file by setting some global Python variables:

JupyterLite content#

You can embed custom content (notebooks and data files) in your JupyterLite build by providing the following config:

jupyterlite_contents = ["./path/to/my/notebooks/", "my_other_notebook.ipynb"]

jupyterlite_contents can be a string or a list of strings. Each string is expanded using the Python glob.glob function with its recursive option. See the glob documentation and the wildcard pattern documentation for more details.

JupyterLite dir#

By default, jupyterlite-sphinx runs the jupyter lite build command in the docs directory, you can overwrite this behavior and ask jupyterlite to build in a given directory:

# Build in the current directory
jupyterlite_dir = "/path/to/your/lite/dir"

JupyterLite config#

You can provide custom configuration to your JupyterLite deployment.

For example, if you want to have bqplot working in this deployment, you need to install the bqplot federated extension and you can serve the bqplot wheel to piplite, this is done by telling your where to look for the jupyterlite config:

jupyterlite_config = "jupyterlite_config.json"

The jupyterlite_config.json containing the following:

    "LiteBuildConfig": {
        "federated_extensions": [
        "ignore_sys_prefix": true
    "PipliteAddon": {
        "piplite_urls": [

The example above also includes the Pyodide kernel for JupyterLite as a federated_extensions. See the JupyterLite documentation to learn more about configuring your environment.

Then you should be able to show Notebooks working with bqplot!

.. retrolite:: bqplot.ipynb

Disable the .ipynb docs source binding#

By default, jupyterlite-sphinx binds the .ipynb source suffix so that it renders Notebooks included in the doctree with JupyterLite. This is known to bring warnings with plugins like sphinx-gallery, or to conflict with nbsphinx.

You can disable this behavior by setting the following config:

jupyterlite_bind_ipynb_suffix = False