-
Notifications
You must be signed in to change notification settings - Fork 44
[APT-1692] Strip /docs/ prefix from all site URLs #164
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
Conversation
✔️ Deploy Preview for pensive-meitner-faaeee ready! 🔨 Explore the source changes: 1cb16b1 🔍 Inspect the deploy log: https://app.netlify.com/sites/pensive-meitner-faaeee/deploys/61f9eb79a692010007fbc65a 😎 Browse the preview: https://deploy-preview-164--pensive-meitner-faaeee.netlify.app |
2d548ff
to
1cb16b1
Compare
Doesn't this break all existing URLs? E.g., I already shared https://docs.gruntwork.io/docs/guides/production-framework/ on social media... Can we add a redirect from |
I believe we can add redirects according to: https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-client-redirects |
Yeah, the |
Oh, but this is just a client side redirect. Ideally we'd do this server side with a proper 301 (permanent). We should look into configuring this on our server instead of in Docusaurus first. @eak12913 can you explore what's possible in your config? |
We've discussed this internally and we're not going to release this as-is. Instead we're going to merge this PR and then we're going to update our S3 bucket to have a routing rule according to: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html We've already applied this rule to stage and will now test what happens after this PR gets merged to make sure there are no issue. If we're successful then we'll make a similar change to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - merging to do a final test on stage.
@brikis98: Update - this has been confirmed as working in stage such that: https://docs.dogfood-stage.com/docs/guides/production-framework/ will receive a 301 and redirect to the non- |
This takes advantage of the Docusaurus base page parameter to avoid the redundant "/docs/…" bit of the path for every file on the docs site. All internal links are updated accordingly.