fix: docs link error

This commit is contained in:
ReaJason
2026-08-30 21:19:42 +08:00
parent e1152000f2
commit f806ab2c2c
+12 -2
View File
@@ -1,8 +1,10 @@
import { ExternalLinkIcon } from "lucide-react";
import type { LinkItemType } from "fumadocs-ui/layouts/shared"; import type { LinkItemType } from "fumadocs-ui/layouts/shared";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { LanguageSwitcher } from "@/components/language-switcher"; import { LanguageSwitcher } from "@/components/language-switcher";
import { env } from "@/config";
type NavLabelKey = "MemShellGenerator" | "ProbeShellGenerator" | "documents" | "about"; type NavLabelKey = "MemShellGenerator" | "ProbeShellGenerator" | "documents" | "about";
@@ -12,6 +14,9 @@ function NavLabel({ translationKey }: { translationKey: NavLabelKey }) {
return t(translationKey); return t(translationKey);
} }
const basePath = env.BASE_PATH?.replace(/^\/+|\/+$/g, "") ?? "";
const docsUrl = `/${basePath ? `${basePath}/` : ""}docs`;
export const siteConfig = { export const siteConfig = {
name: "MemShellParty", name: "MemShellParty",
url: "https://party.memshell.news", url: "https://party.memshell.news",
@@ -31,8 +36,13 @@ export const siteConfig = {
url: "/probeshell", url: "/probeshell",
}, },
{ {
text: <NavLabel translationKey="documents" />, text: (
url: "/docs", <span className="inline-flex items-center gap-1.5">
<NavLabel translationKey="documents" />
<ExternalLinkIcon aria-hidden="true" className="size-3.5" />
</span>
),
url: docsUrl,
external: true, external: true,
}, },
{ {