External links open in new tab#49
Merged
Merged
Conversation
Contributor
|
I’m fine with this though I don’t think it’s a huge deal. I guess the question is - how easy is it to turn off? Whether or not a link should open in a new tab is hard to make a universal rule. (If you’re inclined as a user opening links in new tabs is something you can control one way—ie it’s easy to cmd-click a link to force it to a new tab, but many more steps to remove/circumvent the _blank attribute if it’s set by the website. So user control suggests doing less automatically.) OTOH, if authors aren’t consistent randomly adding _blank is more confusing than everything opening in new tabs. I guess I slightly lean towards having this. -- Michael BallFrom my iPhonehttps://mball.coLecturer UC Berkeley EECS | Travel Advisor Fora On Mar 21, 2026, at 8:01 AM, Silas Santini ***@***.***> wrote:Add a gem that makes all external links open in a new tab. Now there's no need to manually add target="_blank".
@cycomachead @yanlisa @phrdang Should we add this to the template? I think DATA instructors are split: some want external links to always open in a new tab, others don't care.
You can view, comment on, or merge this pull request online at:
#49
Commit Summary
acd5992 external links open in new tab
File Changes (3 files)
M
Gemfile
(1)
M
Gemfile.lock
(4)
M
_config.yml
(1)
Patch Links:
https://github.com/berkeley-cdss/docs/pull/49.patch
https://github.com/berkeley-cdss/docs/pull/49.diff
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Member
|
Yeah I agree with Michael, ideally this would be nice if it's configurable and not default behavior. I also use cmd+click if I want to open something in a new tab, so this could be confusing if it always opens a new tab. (Also if we are doing internal linking I feel like that should not open a new tab, e.g. going from one page in the docs to the next.) |
Member
|
Oh wait I see it's external links only. I think that's fine then! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a gem that makes all external links open in a new tab. Now there's no need to manually add
target="_blank".@cycomachead @yanlisa @phrdang Should we add this to the template? I think DATA instructors are split: some want external links to always open in a new tab, others don't care.