MkDocs Link Marker
mkdocs-link-marker is an MkDocs plugin designed to automatically mark external or mailto links within your documentation, enhancing user experience by visually distinguishing these links. It is currently at version 0.3.0 and maintains an active development cycle with regular updates addressing features and fixes.
Warnings
- gotcha Starting from v0.2.0, external links that are part of an image (``) are no longer marked by default. If you relied on this behavior, you might notice a change in your documentation output.
- gotcha Version 0.3.0 introduced new configuration options like `ignore_urls` and `extra_external_attrs`. Failing to configure these might lead to undesired link marking or lack of specific attributes, particularly if you need to exclude certain domains from being marked or add custom HTML attributes like `target="_blank"` and `rel="noopener"` for external links.
Install
-
pip install mkdocs-link-marker
Imports
- link-marker (plugin entry)
plugins: - link-marker
Quickstart
site_name: My Docs
plugins:
- search
- link-marker: # Enable the link-marker plugin
# Optional configuration:
# external_icon: ' 🔗'
# mail_icon: ' ✉️'
# ignore_urls: ['www.example.com']
# extra_external_attrs: {'target': '_blank', 'rel': 'noopener'}