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

fix(v2): absolute Links should be automatically prefixed by baseurl #3143

Merged
merged 2 commits into from
Jul 28, 2020

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Jul 28, 2020

Motivation

Automatically append the baseUrl to links, but this time only the "safe/absolute ones": "/docs/xyz" => "/baseUrl/docs/xyz"

We should absolutely avoid transforming relative links to absolute ones.
useBaseUrl looks buggy to me and does this: "xyz" => "/baseUrl/xyz"

Related issue: #3136

This is a temporary workaround, we should rather use ReactRouter basename and deprecate useBaseUrl()

Have you read the [Contributing Guidelines on pull requests]

Yes

Test Plan

The broken links should fail CI. We now have some in /docs/search.md for dogfooding

Related PRs

#3107
#3059
#3093

…ith / (because useBaseUrl behavior is buggy and forces relative links to absolute links)
@slorber slorber requested a review from yangshun as a code owner July 28, 2020 16:12
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 28, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 20cd2f3

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

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Jul 28, 2020
@slorber slorber merged commit e1b2963 into master Jul 28, 2020
@yangshun yangshun deleted the slorber/put-back-withbaseUrl branch August 26, 2020 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants