From 6f8f307a5d3dfe18abd522b4f45d9db28c96ef4e Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 20 May 2025 10:03:19 -0700 Subject: [PATCH] fix(docs): fix docs sidebar --- apps/docs/app/(docs)/[[...slug]]/layout.tsx | 45 +------------------- apps/docs/app/(docs)/layout.tsx | 46 +++++++++++++++++++++ bun.lock | 4 +- 3 files changed, 51 insertions(+), 44 deletions(-) create mode 100644 apps/docs/app/(docs)/layout.tsx diff --git a/apps/docs/app/(docs)/[[...slug]]/layout.tsx b/apps/docs/app/(docs)/[[...slug]]/layout.tsx index 8f9568286..257c2d8c2 100644 --- a/apps/docs/app/(docs)/[[...slug]]/layout.tsx +++ b/apps/docs/app/(docs)/[[...slug]]/layout.tsx @@ -1,46 +1,5 @@ import type { ReactNode } from 'react' -import Link from 'next/link' -import { DocsLayout } from 'fumadocs-ui/layouts/docs' -import { ExternalLink, GithubIcon } from 'lucide-react' -import { source } from '@/lib/source' -const GitHubLink = () => ( -
- - - -
-) - -export default function Layout({ children }: { children: ReactNode }) { - return ( - <> - Sim Studio, - }} - links={[ - { - text: 'Visit Sim Studio', - url: 'https://simstudio.ai', - icon: , - }, - ]} - sidebar={{ - defaultOpenLevel: 1, - collapsible: true, - footer: null, - }} - > - {children} - - - - ) +export default function SlugLayout({ children }: { children: ReactNode }) { + return children } diff --git a/apps/docs/app/(docs)/layout.tsx b/apps/docs/app/(docs)/layout.tsx new file mode 100644 index 000000000..da248c863 --- /dev/null +++ b/apps/docs/app/(docs)/layout.tsx @@ -0,0 +1,46 @@ +import type { ReactNode } from 'react' +import Link from 'next/link' +import { DocsLayout } from 'fumadocs-ui/layouts/docs' +import { ExternalLink, GithubIcon } from 'lucide-react' +import { source } from '@/lib/source' + +const GitHubLink = () => ( +
+ + + +
+) + +export default function Layout({ children }: { children: ReactNode }) { + return ( + <> + Sim Studio, + }} + links={[ + { + text: 'Visit Sim Studio', + url: 'https://simstudio.ai', + icon: , + }, + ]} + sidebar={{ + defaultOpenLevel: 1, + collapsible: true, + footer: null, + }} + > + {children} + + + + ) +} \ No newline at end of file diff --git a/bun.lock b/bun.lock index 0bd17dabe..c0a92e2be 100644 --- a/bun.lock +++ b/bun.lock @@ -161,7 +161,7 @@ }, "packages/simstudio": { "name": "simstudio", - "version": "0.1.16", + "version": "0.1.17", "bin": { "simstudio": "dist/index.js", }, @@ -3228,6 +3228,8 @@ "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + "fdir/picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="], + "form-data/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], "fumadocs-mdx/chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="],