website: Add redirect settings#500
Merged
Merged
Conversation
|
Preview: https://abetomo.github.io/openarm See https://github.com/enactic/openarm/blob/main/website/README.md#pull-request-and-preview how to configure preview on fork. |
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Docusaurus client-side redirects so legacy (now-removed) 2.0 routes correctly land on their 1.0 equivalents, avoiding broken links when navigating older content and external references.
Changes:
- Add
@docusaurus/plugin-client-redirectsdependency to the website package. - Configure explicit redirects for a few renamed/moved “getting-started” pages.
- Add
createRedirectsrules to redirect selected unversioned paths (e.g.,/software/...) to versioned 1.0 routes (e.g.,/1.0/software/...).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| website/package.json | Adds the @docusaurus/plugin-client-redirects dependency needed to build redirects. |
| website/package-lock.json | Locks the newly added redirect plugin and its resolved metadata. |
| website/docusaurus.config.ts | Registers and configures the redirect plugin (static redirects + rule-based redirects from removed v2 paths to v1 paths). |
Files not reviewed (1)
- website/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+111
to
+118
| createRedirects(existingPath: string) { | ||
| const removedInV2 = [ | ||
| '/1.0/software', | ||
| '/1.0/hardware/assembly-guide', | ||
| '/1.0/hardware/bill-of-materials', | ||
| '/1.0/hardware/specifications', | ||
| '/1.0/hardware/wiring-and-casing-guide', | ||
| ]; |
Redirect pages that are no longer in 2.0 to 1.0. Plugins to use: https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-client-redirects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redirect pages that are no longer in 2.0 to 1.0.
Plugins to use:
https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-client-redirects