Skip to content

docs: fix broken rsetup link on canbus pages - #2022

Open
tangzz-radxa wants to merge 1 commit into
radxa-docs:mainfrom
tangzz-radxa:docs/zero3-canbus-rsetup-link-273
Open

docs: fix broken rsetup link on canbus pages#2022
tangzz-radxa wants to merge 1 commit into
radxa-docs:mainfrom
tangzz-radxa:docs/zero3-canbus-rsetup-link-273

Conversation

@tangzz-radxa

Copy link
Copy Markdown
Contributor

Fixes #273

Problem

The shared _canbus.mdx component 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 at getting-started/interface-usage/ depth (e.g. cm3i, rock3b). On app-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 optional rsetup_link prop; the default keeps the previous working path so cm3i / rock3b pages are unaffected.
  • The affected product pages pass the correct rsetup page for their product:
    • zero3 → ../radxa-os/rsetup#overlays (/zero/zero3/radxa-os/rsetup exists)
    • rock3a / e25 → ../system-config/rsetup#overlays (their rsetup lives under system-config/)

Verification

  • Live 404 confirmed for /zero/radxa-os/rsetup and /rock3/radxa-os/rsetup before the fix.
  • Target pages verified present in the repo: zero/zero3/radxa-os/rsetup.md, rock3/rock3a/system-config/rsetup.md, rock3/e25/system-config/rsetup.md.
  • github_pr_guard.py bilingual check: no missing zh/en counterparts (single root-cause fix touching the shared component and its consumers; scopes span 4 product dirs by design).

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue from zero/zero3/app-development/canbus

1 participant