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

Open links in different tabs #1542

Open
DeadpoolX7 opened this issue Dec 26, 2024 · 12 comments · May be fixed by #1595
Open

Open links in different tabs #1542

DeadpoolX7 opened this issue Dec 26, 2024 · 12 comments · May be fixed by #1595

Comments

@DeadpoolX7
Copy link

DeadpoolX7 commented Dec 26, 2024

Open links of repos in different tabs to save time

If links are opened in different tabs it would be easier for users to return to home read.me in a single click, rather than after going through a lot of issues in project repos and doing back back!
Think, of it.

@athinaanv
Copy link

Can I give this an attempt and see where I can get?

@sammyhori
Copy link
Collaborator

Can I give this an attempt and see where I can get?

Please do, I think this is a great idea.

You'll probably need to change something in the way the markdown syntax is written in the template for the README (found at .github/README-template.j2).

@sammyhori
Copy link
Collaborator

It does seem that this may not be possible actually, but please let me know if you find a reasonable working solution.

@DeadpoolX7
Copy link
Author

DeadpoolX7 commented Dec 31, 2024

@sammyhori actually you're right it's not possible currently markdown doesn't support such feature to be implemented with it's syntax.

  • Rather it's better to educate or suggest user to open the link in new tab for better experience 🙂

@ShahHetvi24
Copy link

can we do like this :
When the new_technology_dict function is called, each entry will have a target="_blank" attribute.
The Jinja2 template will use this attribute to render each link with the target="_blank" value, ensuring it opens in a new tab when clicked.

@sammyhori
Copy link
Collaborator

  • Rather it's better to educate or suggest user to open the link in new tab for better experience 🙂

That does seem to be the best we can do, perhaps a little note telling people to SHIFT+CLICK to do so.

@sammyhori
Copy link
Collaborator

can we do like this : When the new_technology_dict function is called, each entry will have a target="_blank" attribute. The Jinja2 template will use this attribute to render each link with the target="_blank" value, ensuring it opens in a new tab when clicked.

Whilst that might work when templating HTML and with some other markdown programs, my understanding is that GitHub removes the target attribute when rendering markdown so this unfortunately wouldn't work (see the accepted answer to this StackOverflow question).

@Satnambatth
Copy link

Open links of repos in different tabs to save time

If links are opened in different tabs it would be easier for users to return to home read.me in a single click, rather than after going through a lot of issues in project repos and doing back back!
Think, of it.

link name
This is only best way to open a link with one click on new tab use target attribute front of href attribute.

@sammyhori
Copy link
Collaborator

link name
This is only best way to open a link with one click on new tab use target attribute front of href attribute.

It doesn't work for me, for reasons stated above: GitHub removes the target attribute when rendering markdown.
This can be seen when I try and quote your message, GitHub quotes the link as [link name](link), despite the fact that if I edit your message it shows how you've put it (<a target="_blank" href="link">link name</a>).

@vishalshinde23
Copy link

feat: Update README template to open links in new tabs

  • Modified README-template.j2 to include target="_blank" in anchor tags
  • Ensured all links in the generated README.md open in new tabs
  • Updated data.json to include new technologies and repositories

@ArunaHulakoti
Copy link

@MunGell I'd like to contribute to this. Should I proceed with updating README-template.j2 to include target="_blank", or should we focus on adding a user tip in the README? Let me know how you'd like to move forward.

@sammyhori
Copy link
Collaborator

@ArunaHulakoti Leaving a tip for users somewhere near the beginning of the README-template.j2 would be great, thank you.

You should just be able to use markdown syntax to format this.

Denys619 referenced this issue Mar 20, 2025
…e links open in the same tab

In addition to this warning, added a tip on how to open a link in a new tab.
Denys619 added a commit to Denys619/awesome-for-beginners that referenced this issue Mar 20, 2025
…e links open in the same tab

In addition to this warning, added a tip on how to open a link in a new tab.

Resolves MunGell#1542
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.

7 participants