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): set correct canonical url for docs home page #2896

Merged
merged 1 commit into from
Jun 6, 2020

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Jun 6, 2020

Motivation

Currently the canonical url for docs homepage refers to the original doc permalink, we need to adjust it. Since this affects the render of component, you need to change the canonical url in the DocPage component itself.

<link data-react-helmet="true" rel="canonical" href="https://v2.docusaurus.io/docs/introduction">

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

On Preview (https://deploy-preview-2896--docusaurus-2.netlify.app/docs/):

- <link data-react-helmet="true" rel="canonical" href="https://v2.docusaurus.io/docs/introduction">
+ <link data-react-helmet="true" rel="canonical" href="https://v2.docusaurus.io/docs/">

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 added the pr: bug fix This PR fixes a bug in a past release. label Jun 6, 2020
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 6, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit ded2d6a

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

@lex111
Copy link
Contributor Author

lex111 commented Jun 6, 2020

Argh, again the tests fail due to exceeding the build timeout of website v1:

    : Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Error:

@yangshun yangshun merged commit 277f02b into master Jun 6, 2020
@lex111 lex111 deleted the lex111/proper-can-url-docs-homepage branch June 7, 2020 05:51
@slorber
Copy link
Collaborator

slorber commented Jun 8, 2020

Hey @lex111

Mutating props is not really a good practice in React and can have unwanted side-effects. I'm making another PR to move this fix to a more appropriate place (should also ensure that the bootstrap theme stays coherent with the classic theme)

@slorber
Copy link
Collaborator

slorber commented Jun 8, 2020

Actually found another place where the link is broken, currently in production:

image

The metadatas should rather be correct in the first place, trying to solve that right now

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.

5 participants