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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(v2): add trailing slash to external links #2801

Merged
merged 1 commit into from
May 24, 2020

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented May 23, 2020

Motivation

External links that contain a period in the last segment of the path (.com or .js) will now be considered as file links, and therefore they will not open in a new tab.

See https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.js#L24

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 requested a review from yangshun as a code owner May 23, 2020 08:04
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label May 23, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 58e2332

https://deploy-preview-2801--docusaurus-2.netlify.app

@yangshun
Copy link
Contributor

Why the need for this change?

@lex111
Copy link
Contributor Author

lex111 commented May 24, 2020

We recently made external links open in a new tab, however this will not work for links that look like files. See for yourself, on the page https://v2.docusaurus.io/docs/contributing/ click on "Docusaurus 2".

Docusaurus 2 is currently under alpha development

The same thing I tried to reflect in #2802.

@yangshun yangshun merged commit 4cc36a5 into master May 24, 2020
@yangshun yangshun deleted the lex111/doc-external-link branch May 24, 2020 11:46
@lex111 lex111 added this to the v2.0.0-alpha.56 milestone May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants