Open external links in new tabs of the browser in Sphinx HTML documents
Project description
sphinx-new-tab-link
Open external links in new tabs of the browser in Sphinx HTML documents
Overview
If you enable sphinx_new_tab_link
, external links of built HTML are opened in new tabs of your browser.
The reST
External link: `Example <https://example.com/>`_
is converted into
External link: <a class="reference external" href="https://example.com/" rel="noopener noreferrer" target="_blank">Example</a>
Usage
First, create your Sphinx documentation.
Then edit conf.py
to use this extension.
extensions = [
"sphinx_new_tab_link",
]
Configuration
new_tab_link_show_external_link_icon
- Type:
bool
- Default:
False
If you want to show external links with icons, set this to True
in your conf.py
.
new_tab_link_show_external_link_icon = True
Roles
External link with icon (Experimental)
External link: :icon-link:`Example <https://example.com/>`
Enjoy documentation!🙌
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sphinx_new_tab_link-0.6.1.tar.gz
.
File metadata
- Download URL: sphinx_new_tab_link-0.6.1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 856886e42facc2b1b4d1b937fe192635b40979a96bde30ffc6ae22d494797cb0 |
|
MD5 | 00e3ca62a2ba56c9cb8f51ff503722fc |
|
BLAKE2b-256 | b340c0041196ffcde109889dedc1df27b01fb0cacf939b86109f6bc366d41d47 |
File details
Details for the file sphinx_new_tab_link-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: sphinx_new_tab_link-0.6.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48900b4eea02c4ac0f11360d211e57a0659b68e73e9f7822de8a8b5b9b344320 |
|
MD5 | 43fdd9ee48c61394528fbc199547fbe4 |
|
BLAKE2b-256 | 58e9bcfad182affa762feff44faeb9ef80862746b2fb8434b4f3d3414df25992 |