{"id":8321,"library":"mkdocs-open-in-new-tab","title":"MkDocs Open In New Tab Plugin","description":"mkdocs-open-in-new-tab is an MkDocs plugin designed to automatically open outgoing links and PDF files in a new browser tab. As of version 1.0.8, it provides stable functionality for enhancing user navigation in MkDocs-generated documentation sites. Releases are infrequent but stable, addressing key compatibility and feature needs.","status":"active","version":"1.0.8","language":"en","source_language":"en","source_url":"https://github.com/JakubAndrysek/mkdocs-open-in-new-tab","tags":["mkdocs","plugin","documentation","html","links","accessibility"],"install":[{"cmd":"pip install mkdocs-open-in-new-tab","lang":"bash","label":"Install plugin"}],"dependencies":[{"reason":"This package is an MkDocs plugin and requires MkDocs to function.","package":"mkdocs","optional":false}],"imports":[{"note":"MkDocs plugins are enabled in mkdocs.yml using their registered plugin name ('open-in-new-tab'), not the PyPI package name ('mkdocs-open-in-new-tab') or a Python import.","wrong":"plugins:\n  - mkdocs_open_in_new_tab","symbol":"open-in-new-tab","correct":"plugins:\n  - open-in-new-tab"}],"quickstart":{"code":"site_name: My Docs\n\nplugins:\n  - open-in-new-tab:\n      external_only: true  # Only open external links in new tabs\n      pdf_only: false      # Do not open PDF links in new tabs\n","lang":"yaml","description":"To enable the plugin, add 'open-in-new-tab' to the 'plugins' section of your `mkdocs.yml` configuration file. You can optionally configure 'external_only' and 'pdf_only' to control its behavior."},"warnings":[{"fix":"Install MkDocs: `pip install mkdocs`","message":"Ensure MkDocs is installed and accessible in your environment. As a plugin, it relies on MkDocs to run and generate documentation.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to version 1.0.3 or newer: `pip install --upgrade mkdocs-open-in-new-tab`","message":"Versions prior to 1.0.3 had a known issue where they could interfere with MkDocs' instant loading feature, causing navigation problems.","severity":"gotcha","affected_versions":"<1.0.3"},{"fix":"Review the plugin's configuration options in `mkdocs.yml`. Set `external_only: true` to target only external links, and `pdf_only: true` (or `false`) based on your specific needs for PDF links.","message":"Incorrectly configuring `external_only` or `pdf_only` can lead to unexpected link behavior. For instance, setting `external_only: false` will make *all* links (internal and external) open in new tabs, which might not be desired.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure the plugin is installed (`pip install mkdocs-open-in-new-tab`) and that the `plugins` section in `mkdocs.yml` correctly lists `open-in-new-tab`.","cause":"The plugin is not installed, or there is a typo in the `mkdocs.yml` configuration.","error":"Plugin 'open-in-new-tab' not found."},{"fix":"Carefully check the indentation and syntax of your `mkdocs.yml` file, especially around the `plugins` section. YAML is sensitive to whitespace.","cause":"The `mkdocs.yml` configuration file contains invalid YAML syntax (e.g., incorrect indentation, missing colons).","error":"YAMLError: while scanning a simple key"},{"fix":"MkDocs plugins are configured in `mkdocs.yml`. Remove any Python `import` statements for `mkdocs_open_in_new_tab` and ensure it's correctly listed under the `plugins` section in your `mkdocs.yml`.","cause":"Attempting to import the plugin directly in Python code. MkDocs plugins are not meant to be imported this way.","error":"ModuleNotFoundError: No module named 'mkdocs_open_in_new_tab'"}]}