docsify
docsify copied to clipboard
enhancement: support relative path with target config.
Summary
Support relative path set target
config.
close #1750
What kind of change does this PR introduce?
Bugfix
For any code change,
- [ ] Related documentation has been updated if needed
- [ ] Related tests have been updated or tests have been added
Does this PR introduce a breaking change? (check one)
- [ ] Yes
- [x] No
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
#1750
Tested in the following browsers:
- [x] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Edge
- [ ] IE
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.
docsify-preview – ./
🔍 Inspect: https://vercel.com/docsifyjs/docsify-preview/HRJhhNznrse57qin19594z9xQ1FA
✅ Preview: https://docsify-preview-git-feat-target-docsifyjs.vercel.app
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 628690e0a11ab40cb1142a7be619460b1e97d8a9:
Sandbox | Source |
---|---|
docsify-template | Configuration |
Why do we check if it doesn't start with mailto:
? Does that break mailto links?
I'm of the opinion that we shouldn't get in the way, should not change intent. So if someone writes a mailto link with a target, just like they can in regular HTML (<a href="mailto:..." target="blank">
), we should just let it be.
It in other words, it shouldn't be our goal to change DOM conventions, but only to provide the interface to it as much as we can.
@trusktr --
Why do we check if it doesn't start with mailto:? Does that break mailto links?
I don't know the history, but my guess is that the original contributor was unaware of the usefulness of using the target
attribute on mailto:
links. The target
attribute is ignored when the default email client is an external app (Apple Mail, Outlook, Thunderbird, etc) but it is honored when the default email client is web-based (Gmail, iCloud, Outlook.com, etc).
I'm of the opinion that we shouldn't get in the way, should not change intent. So if someone writes a mailto link with a target, just like they can in regular HTML (
<a href="mailto:..." target="blank">
), we should just let it be.
Agreed, but this is a separate issue. My vote would be to review this PR for its intended purpose and create another PR to "fix" the target attribute on mailto:
links.
@trusktr Hi, as @jhildenbiddle said, it is the original contributor did, I wanna keep it incase of any unpredicted changes.
If we could change the mailto:
issue, I agree that we can have a new one to fix that .
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
docsify-preview | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 4, 2024 10:13am |