8000 Open relative link in new tab does not work with instant loading · Issue #1609 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Open relative link in new tab does not work with instant loading #1609

@pamelasarkisyan

Description

@pamelasarkisyan

I checked that...

  • ... the documentation does not mention anything about my problem
  • ... the problem doesn't occur with the default MkDocs template
  • ... the problem is not in any of my customizations (CSS, JS, template)
  • ... there are no open or closed issues that are related to my problem

Description

Open relative link in new tab does not work.

[As specified in the checks I did remove the theme and check the behaviour using just mkdocs without any theme and the links are opening correctly in another tab.]

Expected behavior

Relative link should open in new tab.

Actual behavior

Relative link opens in same tab/page.

https://3os.org/markdownCheatSheet/links/#link_with_open_in_new_tab
This is a live site using the theme and when you click on Relative Link With New Tab you will see the behavior.

Steps to reproduce the bug

Option 1:
Create an .md file inside docs/ and add link to any page:
[link](../another-page.md){target=_blank}
or
[link](../another-page.md){:target="_blank"}

Option 2:
Create an .md file inside docs/ and add full link to a page on a site which has the same domain:
[link](https://yourdomain.com/){target=_blank}
or
[link](../another-page.md){:target="_blank"}

Package versions

  • Python: Python 3.8.2
  • MkDocs: version 1.1
  • Material: Version: 5.1.0

Project configuration

# Project information
site_name: 'xyz'
site_description: 'xyz'
site_url: 'xyz'

#nav
<!-- not included -->

#theme options
theme:
  name: 'material'
  favicon: 'icons/favicon.png'
  features:
    - tabs
    - instant

#extensions
markdown_extensions:
  - admonition
  - codehilite:
      guess_lang: false
      use_pygments: true
  - pymdownx.superfences
  - toc:
      permalink: true
      toc_depth: 3
  - attr_list

System information

  • OS: Any
  • Browser: Any

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0