Skip to content

External Links in Jupyter Notebooks Not Opening in New Tabs #2229

Answered by george-gca
mscherrmann asked this question in Q&A
Discussion options

You must be logged in to vote

For this you'll have to modify all the links inside the converted notebook to include target="_blank". You can base this code on the code responsible for changing the jupyter notebook theme to dark/light.

In that code we retrieve the body element from the notebook html code. From that point on you should be able to retrieve all the <a> elements and modify them. If you manage to solve this, would you mind sending a PR?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mscherrmann
Comment options

Answer selected by mscherrmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants