MkDocs plugin to open outgoing links and PDFs in new tab.
Low maintenance activity. Last release over 2 years ago, commits in 2 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install mkdocs-open-in-new-tabMkDocs - Open in a new tab plugin
This plugin adds JS code to open outgoing links and PDFs in a new tab.
The automatic opening of links in a new tab is a common feature of modern websites. It is also a good practice for accessibility. However, it is not a default behavior of Markdown. This plugin adds a JavaScript code to your website that opens external links and PDFs in a new tab.
Look at the demo.
Installation
Install the plugin using pip from PyPI:
pip install mkdocs-open-in-new-tab
Usage
Add the plugin to your mkdocs.yml:
plugins:
- search
- open-in-new-tab
Configuration
The plugin supports the following configuration option:
add_icon:(default: false)- If set to true, the plugin will add an icon next to external links.
Testing
Link to Google and GitHub. Both should links should open in a new tab.
Relative link to Relative link should open in the same tab.