diff --git a/docs/source/api.rst b/docs/source/api.rst index 6acdfb777..5d3b1ac38 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -63,6 +63,35 @@ This reports the version of BinderHub and the services it needs to run. This reports which :doc:`repository providers ` are enabled. +Launch URL Parameters +--------------------- + +BinderHub supports special URL parameters to open files or specific Jupyter interfaces directly after launch: + +- **filepath**: Opens a specific file or notebook immediately. + + Example: + + .. code-block:: text + + https://mybinder.org/v2/gh/USERNAME/REPO/BRANCH?filepath=notebook.ipynb + +- **urlpath**: Opens a specific Jupyter interface. + + Examples: + + - Open JupyterLab with a notebook: + + .. code-block:: text + + ?urlpath=lab/tree/notebook.ipynb + + - Open a terminal directly: + + .. code-block:: text + + ?urlpath=/terminals/1 + Events ------ diff --git a/docs/source/reference/build.rst b/docs/source/reference/build.rst index 9cfa6f4d9..a732768f6 100644 --- a/docs/source/reference/build.rst +++ b/docs/source/reference/build.rst @@ -1,7 +1,6 @@ build ===== - Module: :mod:`binderhub.build` ------------------------------ @@ -9,9 +8,16 @@ Module: :mod:`binderhub.build` .. currentmodule:: binderhub.build - :class:`Build` -------------- .. autoclass:: Build :members: + +Additional launch link parameters +--------------------------------- + +The following URL parameters are supported when launching a Binder build: + +- **filepath**: Path to a specific file in the repository to open automatically. +- **urlpath**: URL path to open after the Binder server starts. For example, `urlpath=lab` opens JupyterLab.