Description
Feature request
Similar to #186, the nav links in the the default theme should also allow devs to define if a link should open in a new tab or the same tab.
What problem does this feature solve?
If there are .html files in the public
directory, or external sites we want to link to (one of our links says "Back to "), but not open in a new window, we should at least have the option to override the target=_blank
.
What does the proposed API look like?
Same as before
How should this be implemented in your opinion?
So essentially, the theme config would look like this if we wanted an external link to open in the same tab:
themeConfig: {
nav: [
{ text: 'Home', link: '/' },
{
text: 'Partners',
items: [
{ text: 'Site 1 that opens in a new tab', link: 'https://site1.com' },
{ text: 'Site 2 opens in same tab', link: 'https://site2.com', target: null }
]
}
]
}
with the same logic as #186 applied to the NavLink
component
Are you willing to work on this yourself?**
Sure