Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target blank in header link of siteconfig.js #2721

Closed
sriramgroot opened this issue May 5, 2020 · 7 comments 路 Fixed by #3011
Closed

Target blank in header link of siteconfig.js #2721

sriramgroot opened this issue May 5, 2020 · 7 comments 路 Fixed by #3011
Labels
bug An error in the Docusaurus core causing instability or issues with its execution good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. help wanted Asking for outside help and/or contributions to this particular issue or PR. v1 This issue is for Docusaurus 1

Comments

@sriramgroot
Copy link

馃悰 Bug Report

How to add support for target='_blank' in headerlink of siteconfig.js file

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

Tried to have external link in header segment
{href: 'https://github.com', label: 'Github', target: '_blank'}

Expected behavior

It should be redirect the user to that particular site, once they click the link

Actual Behavior

After rendering it is displayed below mentioned screenshot

Your Environment

  • Docusaurus version used: ^1.14.4

  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Version 81.0.4044.129 (Official Build) (64-bit)

  • Operating system and version (desktop or mobile): macOS mojave (Version 10.14.6)

Reproducible Demo

https://gist.github.com/sriramgroot/093b67699a57bdff0308857e9fbfc11e

@sriramgroot sriramgroot added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels May 5, 2020
@amimas
Copy link

amimas commented May 8, 2020

I don't think it's a bug. If anything, it's probably a feature request. Based on the docs, I don't think it's currently possible to set a header link to open in a new tab.

@sriramgroot
Copy link
Author

sriramgroot commented May 8, 2020

I don't think it's a bug. If anything, it's probably a feature request. Based on the docs, I don't think it's currently possible to set a header link to open in a new tab.

Hi @amimas ,
Really thanks for the reply. Whether it is possible in Version 1 of Docusaurus. If there is not possible in Version1 can you please add them as Version2 of Docusaurus

@lex111
Copy link
Contributor

lex111 commented May 8, 2020

This is already possible in v2, but I am not sure if it will be added in v1.

@sriramgroot
Copy link
Author

This is already possible in v2, but I am not sure if it will be added in v1.

Hi @lex111,
How can we add this as a feature in upcoming version release of Docusaurus V1

@yangshun yangshun added v1 This issue is for Docusaurus 1 and removed status: needs triage This issue has not been triaged by maintainers labels Jun 5, 2020
@yangshun
Copy link
Contributor

yangshun commented Jun 5, 2020

Pull requests welcome.

@yangshun yangshun added good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. help wanted Asking for outside help and/or contributions to this particular issue or PR. labels Jun 5, 2020
@taylorallen0913
Copy link
Contributor

@yangshun Is this solved already?

@slorber
Copy link
Collaborator

slorber commented Jun 29, 2020

Hey, this exists in v1 since 2017, just wasn't documented 馃お

  { href: "https://github.com/", label: "GitHub", external: true },

=> #3011

@slorber slorber linked a pull request Jun 29, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. help wanted Asking for outside help and/or contributions to this particular issue or PR. v1 This issue is for Docusaurus 1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants