Open Link in new tab
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- PR merge metrics
- PR metrics pending
Description
Problem
Currently all external https links are opened in the current browser window.
To open an external link in a new tap, one have to use the verbose html tag:
<a href="http://example.com/" target="_blank">Hello, world!</a>.
As mdbook is often used for documentation, it makes sense that links to external reference are opened in a new tab, as our readers still want to refer back to the documentation.
Proposed Solution
Add a custom option to open external links in new tab by default.
Notes
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing mdBook's external-link rendering and configuration handling. Add an opt-in configuration option for opening external HTTPS links in a new browser tab, then verify the generated HTML and confirm existing behavior remains unchanged when the option is not enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100