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

feat: support custom target: _blank config for link #102

Closed
3 tasks done
sanyuan0704 opened this issue Oct 17, 2022 · 2 comments · Fixed by #123
Closed
3 tasks done

feat: support custom target: _blank config for link #102

sanyuan0704 opened this issue Oct 17, 2022 · 2 comments · Fixed by #123

Comments

@sanyuan0704
Copy link
Owner

sanyuan0704 commented Oct 17, 2022

Is your feature request related to a problem? Please describe.

Now Island.js set target: _blank for every external urls (start with http:// or https://), but sometimes we don't want to open a new tab for some links.So we should improve the extensibility of this function.

Describe the solution you'd like

For example, we can expose the config:

{
  markdown: {
    // The link in this list will not open a new window after click
    targetBlankWhiteList: []
  }
}

Now in Island.js,the target: _blank will be attached by rehype-external-links, so we can implement it through it.

Describe alternatives you've considered

No response

Additional context

No response

Validations

  • Read the docs.
  • Read the Contributing Guidelines.
  • Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
@sanyuan0704
Copy link
Owner Author

sanyuan0704 commented Oct 28, 2022

Is there anyone who want to finish it? Now the targetBlankWhiteList config hasn't exposed to user.

@younggglcy
Copy link
Contributor

I'm willing to give it a try in my spare time

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.

2 participants