mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02:00
Markdown links like `[xx](/workspaces)` written in `*.zh.mdx` rendered as bare `<a href="/workspaces">`, which Next's basePath rewrote to `/docs/workspaces` and the docs middleware then routed to English — silently kicking Chinese readers out of their locale on every internal click. Add a `LocaleLink` MDX `a` override that runs every internal href through `prefixLocale(href, lang)` before passing it to `next/link`, and wire a `DocsLocaleProvider` around the MDX body in both page entry points so the override and `NumberedCard` know the active locale. External links, in-page anchors, relative paths, already-prefixed paths, and default-language pages are deliberately left untouched. Closes the bug reported in https://github.com/multica-ai/multica/issues/2173. Co-authored-by: multica-agent <github@multica.ai>
35 lines
863 B
JSON
35 lines
863 B
JSON
{
|
|
"name": "@multica/docs",
|
|
"version": "0.2.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "next dev --port 4000",
|
|
"build": "fumadocs-mdx && next build",
|
|
"start": "next start",
|
|
"typecheck": "fumadocs-mdx && tsc --noEmit",
|
|
"test": "vitest run",
|
|
"postinstall": "fumadocs-mdx"
|
|
},
|
|
"dependencies": {
|
|
"@multica/ui": "workspace:*",
|
|
"fumadocs-core": "^15.5.2",
|
|
"fumadocs-mdx": "^12.0.3",
|
|
"fumadocs-ui": "^15.5.2",
|
|
"lucide-react": "catalog:",
|
|
"mermaid": "^11.14.0",
|
|
"next": "^15.3.3",
|
|
"next-themes": "^0.4.6",
|
|
"react": "catalog:",
|
|
"react-dom": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "catalog:",
|
|
"@types/react": "catalog:",
|
|
"@types/react-dom": "catalog:",
|
|
"tailwindcss": "catalog:",
|
|
"typescript": "catalog:",
|
|
"vitest": "catalog:"
|
|
}
|
|
}
|