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): never remove trailing slash from site root like '/baseUrl/' #5082

Merged
merged 4 commits into from
Jun 29, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Jun 29, 2021

Motivation

Fixes #5077

With baseUrl = /xyz/ and trailingSlash: false, we should never transform the root route to /xyz

Otherwise the output folder will contain website/build/xyz.html instead of website/build/index.html

Trailing slash config should only apply to subroutes of the site, not the root / baseUrl / homepage of the site, or it can lead to 404 server errors

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

tests + dogfooding on our i18n sites (using locale baseurl)

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Jun 29, 2021
@slorber slorber requested a review from lex111 as a code owner June 29, 2021 10:42
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 29, 2021
@netlify
Copy link

netlify bot commented Jun 29, 2021

✔️ [V2]

🔨 Explore the source changes: abea2ad

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60daf9140325540008ebe8d4

😎 Browse the preview: https://deploy-preview-5082--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Jun 29, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 73
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5082--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Jun 29, 2021

Size Change: 0 B

Total Size: 601 kB

ℹ️ View Unchanged
Filename Size
website/build/assets/css/styles.********.css 87.7 kB
website/build/assets/js/main.********.js 415 kB
website/build/blog/2017/12/14/introducing-docusaurus/index.html 66.5 kB
website/build/docs/introduction/index.html 235 B
website/build/index.html 31.3 kB

compressed-size-action

@netlify
Copy link

netlify bot commented Jun 29, 2021

✔️ [V2]

🔨 Explore the source changes: fb42df8

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60db1b59a879240007da2609

😎 Browse the preview: https://deploy-preview-5082--docusaurus-2.netlify.app

@slorber slorber merged commit 7592982 into master Jun 29, 2021
@slorber slorber deleted the slorber/fix-trailingSlash-with-baseUrl branch August 17, 2021 17:48
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.

Using trailingSlash: false on GH-pages causes the root page to flash "Not Found"
2 participants