-
-
Notifications
You must be signed in to change notification settings - Fork 608
Open
Labels
bugSomething isn't workingSomething isn't working
Description
To Reproduce
- Configure Fumadocs i18n with the core middleware and set hideLocale: 'default-locale' so the default language has no locale segment in the URL (e.g. /docs/page for default, /zh/docs/page for other locales).
- On a page under the default locale (address bar shows a path without a locale segment, e.g. /docs/something), add a link using the dynamic-link component with an href that includes a dynamic segment such as /[lang]/docs/other-page (import DynamicLink from fumadocs-core/dynamic-link and set href="/[lang]/docs/other-page").
- Load the page and check the rendered link’s href in the DOM or by hovering/clicking the link.
Current vs. Expected behavior
- Current: The link href is //docs/other-page (double slash). When the default locale is hidden, useParams() does not provide lang, so [lang] is replaced with an empty string, producing a malformed URL.
- Expected: The link should be /docs/other-page (single slash). When the locale segment is omitted for the default language, the path should be normalized so there are no consecutive slashes.
Provide environment information
Operating System:
Platform: win32
Version: Windows 11
Binaries:
Node: 24.13.1
pnpm: 10.18.3Which area(s) are affected? (Select all that apply)
Core
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working