refactor: docubook@latest template nextjs-docker

This commit is contained in:
gitfromwildan
2026-05-30 18:52:21 +07:00
parent bf2ef37f49
commit 80eb49d968
101 changed files with 1759 additions and 4165 deletions

View File

@@ -34,7 +34,10 @@ export default function DocsMenu({ isSheet = false, className = "" }: DocsMenuPr
if (!pathname.startsWith("/docs")) return null;
// Get the current context
const currentContext = getCurrentContext(pathname);
const isDocsRoot = pathname === "/docs" || pathname === "/docs/";
const currentContext = isDocsRoot
? ROUTES[0]?.href.replace(/^\/+|\/+$/g, "")
: getCurrentContext(pathname);
// Get the route for the current context
const contextRoute = currentContext ? getContextRoute(currentContext) : undefined;
@@ -52,9 +55,10 @@ export default function DocsMenu({ isSheet = false, className = "" }: DocsMenuPr
<li key={contextRoute.title}>
<SubLink
{...contextRoute}
href={`/docs${contextRoute.href}`}
href={contextRoute.href}
level={0}
isSheet={isSheet}
parentHref="/docs"
/>
</li>
</ul>