From f806ab2c2c502150dce830e07062c90dfd19d7dd Mon Sep 17 00:00:00 2001 From: ReaJason Date: Sun, 30 Aug 2026 20:37:27 +0800 Subject: [PATCH] fix: docs link error --- web/app/lib/config.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/web/app/lib/config.tsx b/web/app/lib/config.tsx index df26e73d..718e1784 100644 --- a/web/app/lib/config.tsx +++ b/web/app/lib/config.tsx @@ -1,8 +1,10 @@ +import { ExternalLinkIcon } from "lucide-react"; import type { LinkItemType } from "fumadocs-ui/layouts/shared"; import { useTranslation } from "react-i18next"; import { LanguageSwitcher } from "@/components/language-switcher"; +import { env } from "@/config"; type NavLabelKey = "MemShellGenerator" | "ProbeShellGenerator" | "documents" | "about"; @@ -12,6 +14,9 @@ function NavLabel({ translationKey }: { translationKey: NavLabelKey }) { return t(translationKey); } +const basePath = env.BASE_PATH?.replace(/^\/+|\/+$/g, "") ?? ""; +const docsUrl = `/${basePath ? `${basePath}/` : ""}docs`; + export const siteConfig = { name: "MemShellParty", url: "https://party.memshell.news", @@ -31,8 +36,13 @@ export const siteConfig = { url: "/probeshell", }, { - text: , - url: "/docs", + text: ( + + + + ), + url: docsUrl, external: true, }, {