From 4bb0660236e404885a1b8041ae0a80f34ce3f1d6 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Tue, 3 Dec 2024 07:20:03 +0530 Subject: [PATCH 1/2] Fix notebook opening in a new tab --- jupyterlite_sphinx/jupyterlite_sphinx.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jupyterlite_sphinx/jupyterlite_sphinx.py b/jupyterlite_sphinx/jupyterlite_sphinx.py index 366b0e9..80b0e64 100644 --- a/jupyterlite_sphinx/jupyterlite_sphinx.py +++ b/jupyterlite_sphinx/jupyterlite_sphinx.py @@ -129,7 +129,9 @@ def __init__( options = "&".join( [f"{key}={quote(value)}" for key, value in lite_options.items()] ) - self.lab_src = f'{prefix}/{app_path}{f"?{options}" if options else ""}' + self.lab_src = ( + f'{prefix}/{app_path}{f"index.html?{options}" if options else ""}' + ) super().__init__( rawsource, @@ -170,7 +172,7 @@ def __init__( [f"{key}={quote(value)}" for key, value in lite_options.items()] ) - iframe_src = f'{prefix}/{app_path}{f"?{options}" if options else ""}' + iframe_src = f'{prefix}/{app_path}{f"index.html?{options}" if options else ""}' if "iframe_src" in attributes: if attributes["iframe_src"] != iframe_src: @@ -246,7 +248,7 @@ def __init__( [f"{key}={quote(value)}" for key, value in lite_options.items()] ) - iframe_src = f'{prefix}/{app_path}{f"?{options}" if options else ""}' + iframe_src = f'{prefix}/{app_path}{f"index.html?{options}" if options else ""}' super().__init__(rawsource, *children, iframe_src=iframe_src, **attributes) From 29f27bf474f5d01ea19962a2f649ba0c1e4c8ae8 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Wed, 4 Dec 2024 00:22:58 +0530 Subject: [PATCH 2/2] Update documentation about fullscreen access --- docs/full.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/full.md b/docs/full.md index c450172..b79bbd4 100644 --- a/docs/full.md +++ b/docs/full.md @@ -14,4 +14,4 @@ You can access the JupyterLite deployment that `jupyterlite-sphinx` made for you ``` -If you want to open a specific notebook in fullscreen JupyterLab/Notebook, you can use the `path` URL parameter, e.g. `./lite/lab/?path=my_noteboook.ipynb`. +If you want to open a specific notebook in fullscreen JupyterLab/Notebook, you can use the `path` URL parameter, e.g. `./lite/lab/index.html?path=my_noteboook.ipynb`.