Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

links to new tab #227

Closed
carriewright11 opened this issue Sep 21, 2021 · 12 comments · Fixed by #743
Closed

links to new tab #227

carriewright11 opened this issue Sep 21, 2021 · 12 comments · Fixed by #743
Assignees

Comments

@carriewright11
Copy link
Member

Is your feature request related to a problem? Please describe.
It would be nice if when users clicked on a reference it took them to a new tab so that they don't lose their place in the chapter.

Describe the solution you'd like
Users could click on a reference and a new tab would open. Then they could return to reading the course

Describe alternatives you've considered
perhaps we can modify leanbuild to add target="_blank" and rel="noreferrer noopener"

Additional context
Add any other context or screenshots about the feature request here.

@cansavvy
Copy link
Collaborator

Sounds like a great idea. I’ll take a look into it.

@cansavvy
Copy link
Collaborator

cansavvy commented Dec 7, 2021

This doesn't work in Leanpub so that's what's kind of holding me up for implementing this currently.

@cansavvy
Copy link
Collaborator

Now that Leanpub is using our iframes, we can do target="_blank" and that works. So we should update guidance and the pandoc citations accordingly so links always have target="_blank"

@cansavvy cansavvy added before-manuscript and removed enhancement New feature or request labels Feb 10, 2022
@cansavvy
Copy link
Collaborator

This issue is now obsolete with the iframe thing.

@carriewright11
Copy link
Member Author

carriewright11 commented Jan 31, 2023

I wonder if we want reference links to also go to a new tab? So not citation... but references. But yeah, this is already so much better! :)

@cansavvy
Copy link
Collaborator

Yes ideally we want all links to go to a new window. So I'll reopen this issue.

@cansavvy cansavvy reopened this Jan 31, 2023
@kweav
Copy link
Contributor

kweav commented Feb 14, 2024

Is this still an issue that I should assign myself?

@carriewright11
Copy link
Member Author

I think it is worth at least checking how references and citations are navigated :)

@kweav
Copy link
Contributor

kweav commented Apr 8, 2024

Testing some references in the AI course bookdowns, they don't open in a new tab. I know adding the attribute {target="_blank"} after the []() link syntax works for Pandoc, but now trying to figure out how to make it so that all links have that without adding that attribute for every link manually. If I'm understanding what you wrote before, we can make this addition to something in leanbuild or add a function there that automatically adds this attribute to links? And I think leanbuild is now ottrpal?

@howardbaik
Copy link
Contributor

Echoing @kweav : The references in the AI for Decision Makers don't open in a new tab. I'll look into this right now.

@howardbaik
Copy link
Contributor

Potentially useful code I found on the Internet: https://yihui.org/en/2018/09/target-blank/#open-external-links-in-new-tabs-automatically

@howardbaik howardbaik changed the title citation links going to new tab links to new tab Apr 8, 2024
@howardbaik
Copy link
Contributor

@kweav I'll take this issue and will work on a fix in this new branch I created from this issue: 227-links-to-new-tab

@howardbaik howardbaik linked a pull request Apr 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants