question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2] links: nav & footer links (href) without target="_blank"

See original GitHub issue

🚀 Feature

Currently, I can set href for nav and footer links in docusaurus.config.js for the classic-theme but they always render with target="_blank". It would be great if that could be disabled/changed, so that the link will open in the current browser tab rather than opening a new one.

Have you read the [Contributing Guidelines on issues]

Yes

Motivation

I think it is such an essential thing that it should be part of the classic-theme. I mean I could eject the header and footer and just do it myself but that would disconnect me from the theme which seems a little overpowered for such a small change.

Pitch

There could be a config option next to href to control the target, e.g. linkTarget with a default value of _blank or an option targetBlank with default value true.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
lex111commented, Feb 28, 2020

You can add the target property, and thereby override the default value, eg:

{
  href: 'https://github.com/facebook/docusaurus',
  label: 'GitHub',
  position: 'right',
  target: '_self',
},
0reactions
LukasGentelecommented, Feb 29, 2020

Yes, exactly. I got the 404 with to:/, so I switched to using href. Having logo.target would be great. Let me know if you want a PR for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When to use target="_blank" | CSS-Tricks
I use target="_blank" for all external links. Not every user is tech-savvy enough to know how to open a link in a new...
Read more >
Need to have links in footer nav bar open to new tab/window
Total n00b here. What CSS class styling do I add to a custom link widget on Wordpress so the link will have target='_blank'?...
Read more >
RMarkdown html _site.yml navbar href links, open in new tab ...
I'm able to use "<a href="example.com" target="_blank">New Tab</a>" links just fine in my HTML files. I'm specifically looking for a way in my ......
Read more >
HTML Anchors: Here's How To Create Links For Fast ...
Learn how to create HTML hyperlinks. This guide covers the anchor element and all of it's attributes.
Read more >
<a>: The Anchor element - HTML: HyperText Markup Language
Links that open in a new tab/window via target="_blank" , or links that point to a download file should indicate what will happen...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found