mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
fix: docs link error
This commit is contained in:
+12
-2
@@ -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,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user