From 4cbcd64769a83fe54cd64c03bc4b83661c17ff28 Mon Sep 17 00:00:00 2001 From: Ira Pochaievets Date: Wed, 29 Oct 2025 11:22:18 +0200 Subject: [PATCH 1/2] Document filepath and urlpath launch link parameters in API docs --- docs/source/api.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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 ------ From 7521d7fa5ebe0811749fe8dd717966c6dd4eb92f Mon Sep 17 00:00:00 2001 From: Ira Pochaievets Date: Wed, 29 Oct 2025 20:17:20 +0200 Subject: [PATCH 2/2] Move filepath and urlpath docs under /build per review comment --- docs/source/reference/build.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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.