New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open relative link in new tab does not work with instant loading #1609
Comments
Does this happen when you turn off |
Awesome! It did indeed fix the behaviour and the link now opens in another tab. |
Yeah, |
Nice catch! Haven't thought of |
Fixed in e96657c |
... and released as part of 5.1.1 |
I'd like to point out that this hyperlink syntax (e.g. # mkdocs.yml
...
markdown_extensions:
- attr_list
... Would be nice if this was mentioned somewhere, perhaps under Formatting |
|
Is there a way to define this globally for all external links, instead of defining it directly in markdown every time? |
Can you define what "this" refers to? Are you talking about converting all links to use |
@facelessuser Sorry about that. My question is asking if there is a way to define once (perhaps in mkdocs.yml) the conversion of all links that lead to somewhere outside of the local website to use |
This isn't really a theme thing. This could be done with a Python Markdown extension or a MkDocs plugin. I'm not certain at this time if such an extension or plugin already exists, but that is the way such things should be approached. |
I checked that...
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 3.8.2
version 1.1
Version: 5.1.0
Project configuration
System information
The text was updated successfully, but these errors were encountered: