'Link from One GitHub Jupyter Notebook to Another in the Same Repo
Is there any way that I can locally link from one Jupyter notebook to another on GitHub without the need to embed the absolute path, such as https://github.com/jeffheaton/test-linking/blob/main/notebook1.ipynb?
I create a notebook (notebook1.ipynb)
With this content:
# This is Notebook 1
* [Link to Notebook 2a](notebook2.ipynb)
* [Link to Notebook 2b](./notebook2.ipynb))
I tried two different methods, one using the . for current directory. Neither worked.
notebook2.ipynb is actually at this URL:
https://github.com/jeffheaton/test-linking/blob/main/notebook2.ipynb
However, GitHub transforms my link into:
https://notebooks.githubusercontent.com/view/notebook2.ipynb
Which results in a bad link.
If I put this same markdown into README.md it works fine. Just does not seem to like jupyter notebooks.
I would really like to NOT have to prefix everything with https://github.com/jeffheaton/test-linking/blob/main/, because the local links:
- Work locally, outside of GitHub
- On GitHub are branch agnostic
You can see my attempts to make this work at this short repo: https://github.com/jeffheaton/test-linking
Solution 1:[1]
In case anyone happens upon this question. GitHub resolved this issue, relative links now appear to work just fine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | JeffHeaton |