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

[Feature]: Add ability to handle same-origin external links #1673

Open
JounQin opened this issue Dec 17, 2024 · 0 comments · May be fixed by #1674
Open

[Feature]: Add ability to handle same-origin external links #1673

JounQin opened this issue Dec 17, 2024 · 0 comments · May be fixed by #1674

Comments

@JounQin
Copy link
Contributor

JounQin commented Dec 17, 2024

What problem does this feature solve?

We have multiple document projects, and we want to link each other with simple markdown link syntax, but currently all links starting with slash are considered in current document project which results unexpected behavior.

We can not use http:// like links because those websites are expected to be deployed under multiple hostnames. IPs, domains, etc.

What does the proposed API look like?

Add a new option like externalLinkPrefixes: string[]:

externalLinkPrefixes:
  - /site-a/
  - /site-b/

And then handle these link prefixes at

JounQin added a commit to JounQin/rspress that referenced this issue Dec 17, 2024
@JounQin JounQin linked a pull request Dec 17, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant