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

Add option to include relative links #11

Closed
4 tasks done
vlad-zhukov opened this issue Oct 13, 2023 · 4 comments
Closed
4 tasks done

Add option to include relative links #11

vlad-zhukov opened this issue Oct 13, 2023 · 4 comments
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@vlad-zhukov
Copy link

Initial checklist

Problem

I'd like to use this plugin to add target and rel properties to links with relative urls. Currently only absolute urls are supported.

Solution

I suggest the test option to be responsible for that. By default it filters links with absolute urls, and you can override it. This is a breaking change.

Alternatives

  • Add a new option includeRelative
  • Remove filtering completely
@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Oct 13, 2023
@wooorm
Copy link
Member

wooorm commented Oct 13, 2023

Your use case sounds unrelated to this project. This project is explicitly called “external links”, and is about making them safe.
What rels and target do you want to add?
I’d probably recommend to make your own plugin. That’s what our entire ecosystem is about: that you can write plugins to do anything. You likely don’t need much of the logic here. You’ll have simpler code, a smaller bundler, and better performance

@vlad-zhukov
Copy link
Author

I just want certain links to open in a new tab. My own plugin might be a better option here. Thanks!

@github-actions

This comment was marked as resolved.

@wooorm wooorm added the 🙋 no/question This does not need any changes label Oct 16, 2023
@github-actions

This comment was marked as resolved.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants