-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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(theme): canonical url should be not change after hydration if url accessed with/without trailing slash #9130
fix(theme): canonical url should be not change after hydration if url accessed with/without trailing slash #9130
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx
Outdated
Show resolved
Hide resolved
….tsx Co-authored-by: Joshua Chen <[email protected]>
LGTM thanks 👍 Did some minor changes considering we have a This PR improves things a bit and is good enough to merge. Note I think we still have an SEO problem when aliasing docs, see #9170 (unfortunately not so easy to fix). |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
… accessed with/without trailing slash (facebook#9130) Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: sebastienlorber <[email protected]>
… accessed with/without trailing slash (#9130) Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: sebastienlorber <[email protected]>
…lease (#9324) Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: sebastienlorber <[email protected]> Co-authored-by: Sébastien Lorber <[email protected]> Co-authored-by: Ori Shalom <[email protected]> Co-authored-by: Mikey O'Toole <[email protected]> Co-authored-by: TheCatLady <[email protected]> fix flaky screenshots, add html data-has-hydrated attribute (#9256) fix(theme-common): ThemedComponent should display something when JS is disabled (#9243) fix(theme): canonical url should be not change after hydration if url accessed with/without trailing slash (#9130) fix(theme): only set classname on ul elements if they have an existing class (#9099) fix(content-docs): sidebar generator should return customProps for doc items (#9107)
Pre-flight checklist
I'm not really sure how to test it but we have it on every page of the site so I guess we can say there is a dogfooding...
Motivation
See #9128
Test Plan
Visit a page on the website with a trailing slash in the URL and inspect the canonical link using dev tools.
Then navigate to the same page without a trailing slash and inspect the canonical link using dev tools again.
If both versions of the page have the same URL then the bug is fixed.
Screen.Recording.2023-07-08.at.0.22.43.mov
Test links
Deploy preview: https://deploy-preview-9130--docusaurus-2.netlify.app/
Related issues/PRs
Closes #9128