Replies: 2 comments
-
|
A plugin for this already exists: https://github.com/keithmifsud/jekyll-target-blank. It works fine in my experience. |
Beta Was this translation helpful? Give feedback.
0 replies
-
They're being opened in a new tab.
This is true and has nothing to do with the theme itself. Thanks for sharing the solutions. I believe it worth to convert the issue into discussion instead, so others can find it useful. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checklist
Is your feature request related to a problem? Please describe
Currently, the theme’s HTML anchors ( tags) do not include target="_blank" for external links, which forces users to leave the site when clicking. This affects:
Social media links in footer/sidebar.
Any external URL in posts/pages.
Describe the solution you'd like
I've developed a lightweight Jekyll plugin (external_blank.rb) that automatically adds:
to all external links, with:
✅ Zero config – Works out-of-the-box
✅ Selective targeting – Only modifies external links (checks href for http:///https://)
✅ Live tested – Successfully implemented on my blog
Implementation:
Add this to _plugins/external_blank.rb:
Describe alternatives you've considered
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions