Skip to content

docs(site): fix homepage redirect loop and double locale path - #84

Merged
luoxuanzao merged 1 commit into
mainfrom
fix/locale-home-redirect
Sep 29, 2026
Merged

luoxuanzao merged 1 commit into
mainfrom
fix/locale-home-redirect

Conversation

@luoxuanzao

Copy link
Copy Markdown
Member

Summary

  • Clicking the navbar logo on the zh-Hans site navigated to https://qoderai.github.io/zh-Hans/docs/introduction (outside the site prefix) — the router <Redirect> target is resolved without the site baseUrl
  • Replaces it with a full-page redirect built from siteConfig.baseUrl, which already carries the locale prefix in non-default locales (fixing both the 404 and a double-zh-Hans path variant)

Test plan

  • Local serve: /Qoderian/ → /Qoderian/docs/introduction, /Qoderian/zh-Hans/ → /Qoderian/zh-Hans/docs/introduction (verified in browser)
  • Verify live site after merge

The router <Redirect> resolved its target without the site baseUrl,
so the navbar logo linked to a path outside /Qoderian/ (404 on GitHub
Pages). Replacing it with a full-page redirect, driven by
siteConfig.baseUrl — which already carries the locale prefix in
non-default locales — lands both locales on the right introduction
page.
@luoxuanzao
luoxuanzao merged commit c267141 into main Sep 29, 2026
10 checks passed
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.

1 participant