-
Notifications
You must be signed in to change notification settings - Fork 47
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
Feature Request: Configuration To Open External Links in New Tab #45
Comments
So this would happen for any link anywhere on any page, including the menu, the article body, or the footer? I'd like to better understand the need for this. Can you describe why/when this would be used? |
Yes
Let's say somebody adds an external profile like GitHub, StackOverflow, etc. When a visitor clicks the link which takes them there, they see a lot of things. For instance on GitHub, there are pinned project, contributions, personal README, etc. And on StackOverflow there is frequently asked questions, answered questions, profile information, most recent votes, saved posts, etc. Some visitors may dive into that content and may not remember to come back to the personal blog, or how many clicks its going to take for them to get back to where they were on the personal blog. External links like these have a lot of content to "hook" the visitor onto. Opening external links in a new tab is to ensure that the visitor has a way of getting back to the personal blog because there's less distraction, ads, etc. and it's more about the person. |
It sounds like the need is only for "big" links like you described, is that right? Or is there a need to do this for any link, like a link to a definition on dictionary.com or a post on someone's personal blog? |
I think it's going to be easier to have a configuration flag which opens all external links in a new tab. "Big" links are going to vary and tough to keep track of. IMO all external links are "big". |
This is implemented in v0.67.0. Just published. See the new paige.external_link_new_tab site parameter. Can you confirm it works for you? |
I'm not able to get it to work - I updated the theme and see
in the
at the bottom of the config file. |
What is your base url and external link? |
Also, what is the link syntax? Markdown or html? |
It's a website on a different domain. Navigation is from patterns.se to saurabh.sm and creativecommons.org and is happening in the footer. This is the repository URL.
Markdown: |
I've been delayed looking into this because I picked up a new feature right before the problem was reported. Will work on this afterward. |
Sure, thanks Will ! |
external_link_new_tab belongs under params.paige, but you have just paige. You want this: [params.paige]
external_link_new_tab = true |
@saurabh-mish Can you confirm that fixes the issue? |
Hi @willfaught Yes it works !!
Thanks a lot for pointing this out !!
Looks like this is not present is the README. Currently it looks like this |
That documents the configuration object shared by the site and pages:
In page front matter, it appears like this: +++
[paige]
external_link_new_tab = true
+++ In site configuration, it appears like this: [params.paige]
external_link_new_tab = true |
@saurabh-mish I added a line to the readme that should clarify this: e4c6b38. Thanks for the feedback. |
Requesting feature for a configuration which opens external links in a new tab (from discussion #44).
The text was updated successfully, but these errors were encountered: