docs: fix broken rsetup link on canbus pages - #2022
Open
tangzz-radxa wants to merge 1 commit into
Open
Conversation
The shared _canbus.mdx used a fixed relative link ../../radxa-os/rsetup, which resolves correctly only for pages at the getting-started/interface-usage depth (e.g. cm3i, rock3b). On app-development pages (zero3, rock3a, e25) it resolved to a non-existent page (e.g. /zero/radxa-os/rsetup), causing 404. Introduce a rsetup_link prop (default keeps the old working path) and pass the correct per-product rsetup page for zero3/rock3a/e25. Fixes radxa-docs#273
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.
Fixes #273
Problem
The shared
_canbus.mdxcomponent used a fixed relative link../../radxa-os/rsetup#overlays. Relative links inside an imported MDX component resolve against the importing page's route, so this only worked for pages atgetting-started/interface-usage/depth (e.g. cm3i, rock3b). Onapp-development/pages the link resolved to a non-existent page:/zero/zero3/app-development/canbus→/zero/radxa-os/rsetup(404)/rock3/rock3a/app-development/canbus→/rock3/radxa-os/rsetup(404)/rock3/e25/app-development/canbus→/rock3/radxa-os/rsetup(404)Fix
_canbus.mdx(zh + en) now accepts an optionalrsetup_linkprop; the default keeps the previous working path socm3i/rock3bpages are unaffected.../radxa-os/rsetup#overlays(/zero/zero3/radxa-os/rsetupexists)../system-config/rsetup#overlays(their rsetup lives undersystem-config/)Verification
/zero/radxa-os/rsetupand/rock3/radxa-os/rsetupbefore the fix.zero/zero3/radxa-os/rsetup.md,rock3/rock3a/system-config/rsetup.md,rock3/e25/system-config/rsetup.md.github_pr_guard.pybilingual check: no missing zh/en counterparts (single root-cause fix touching the shared component and its consumers; scopes span 4 product dirs by design).