How to set repo links to open in a new tab? #8289
-
Is there a way to set the code actions links to open in new tab?
In reading Adding Git Repository, I did not come across anything. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @DennisJDufrene, Either directly override the Docs reference:
Source reference: |
Beta Was this translation helpful? Give feedback.
Hi @DennisJDufrene,
for these links to open in a new tab you'd have to use customization.
Either directly override the
actions.html
template with a modified version which addstarget="_blank"
to the anchor tags, or add JavaScript to thetarget
after the page loads for the user. At GMC we're using the second approach to open external links in a new tab, so you could reference our solution, but keep in mind that there is a URL comparison, and if you host your page on GitHub Pages, then the repository link would not be seen as external by the code, so you'll have to adjust the solution ✌️Docs reference: