Add anchors to filepath?
See original GitHub issueIs it possible to, when using filepath=
to open a specific file, specify a section/anchor to jump to? For example, if I have this in my file myfile.ipynb
:
<a id='section2'></a>
I’d love to be able to use filepath=myfile.ipynb#section2
to open that file to that anchor.
It looks like something currently sees #
in filepath
and redirects me to a prompt to enter a token or password. I’ve tried various things with urlpath
as well.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How do I enter file paths into a link? (Both local and UNC ...
How do I enter file paths into a link? (Both local and UNC Names). The "correct" link format is file:/// followed by the...
Read more >The Anchor Tag, Relative and Absolute URLs - UC Homepages
The Anchor Tag, Relative and Absolute URLs ... Virtual directory: a directory that follows the / after plantplaces.com. This is usually mapped to...
Read more >HTML Anchors: Here's How To Create Links For Fast ...
Learn how to create HTML hyperlinks. This guide covers the anchor element and all of it's attributes.
Read more >how to give link to a file to the folder within the subfolder using ...
I want to link the aspx files using the anchor tag. i tried like this. <a href="/Home.aspx">Home</ ...
Read more >Linking - Adobe Support
Link files and documents, update, change, and test links in Dreamweaver. ... Type the path and filename of the document in the Link...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
BinderHub uses a token to access to the notebook server for each launch (for each temporary user). Just before redirecting to user server, it logs “server running at …/tree?token=xyz”. But in your case server url becomes “/tree/myfile.ipynb#section2?token=xyz” and because token parameter is behing
#
, it is ignored and you are redirected to login page. So I think it is now not possible to have a file path with anchor.To have it working the server url must be generated as “/tree/myfile.ipynb?token=xyz#section2” and I think this can be achived by updating here: https://github.com/jupyterhub/binderhub/blob/5544f704cb0dd9b8d3d67442a0c744e1ddcb6089/binderhub/static/js/src/image.js#L37-L58
Hi 👋 I think this is something that has to be handled by the application (JupyterLab or notebook), not BinderHub. If you have more questions please use the Jupyter community forum https://discourse.jupyter.org/.