This repository was archived by the owner on Sep 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
This repository was archived by the owner on Sep 1, 2022. It is now read-only.
Links and notebooks/files #158
Copy link
Copy link
Open
Description
One of the core features of the notebook is that notebooks can link through relative links to other notebooks. This allows notebooks to function as proper webpages that can be linked to by other notebooks as well as other web pages. We use this capability ourself in our own docs here:
http://nbviewer.jupyter.org/github/ipython/ipython/blob/4.0.x/examples/IPython%20Kernel/Index.ipynb
Notice that first page has links that are all links to other notebooks in that directory. These links work across the live notebook server, GitHub's rendering and nbviewer. Given this, JupyterLab can't break this critical feature.
Here are some initial thoughts on how we can offer this:
- Visiting a new lab page that has a path to a notebook (
./lab/the/path/notebook.ipynb
) should simply open the default JupyterLab view, open the file browser to that path, and then open that notebook in the dock panel. This may require a slight bit of server logic to handle those paths. - Clicking on a link in a notebook or other content in JupyterLab that has a relative path to another notebook, should simply open that notebook in the current JupyterLab by default. This can be accomplished by intercepting the click on the
a
tag and preventing default and triggering the document open action with that path. Again, the file browser should go to that directory. - If a user holds down command and clicks on such a link, the notebook should open in a new JupyterLab browser tab that follows the idea of point 1.
- Links to relative paths that are not notebooks should follow similar logic. Thus, a notebook should be able to link to a text file and clicking on that text file should open that document in the current JupyterLab tab.
Metadata
Metadata
Assignees
Labels
No labels