Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

chore(docs): Fix nav expanding for subsections

Pavel 'Strajk' Dolecek8a0d7f61e4c4
diff --git a/apps/docs/src/app/getting-started/basics/page.mdx b/apps/docs/src/app/getting-started/basics/page.mdx
index 77f19010c..0822c2f3b 100644
--- a/apps/docs/src/app/getting-started/basics/page.mdx
+++ b/apps/docs/src/app/getting-started/basics/page.mdx
@@ -5,9 +5,8 @@ export const metadata = {
{/* I think this stopped working work after adding Nextjs rewrites */}
export const sections = [
- { title: 'Create Playground', id: 'create-playground' },
+ { title: 'Create Playground', id: 'create-ai-playground' },
{ title: 'Use Filesystem', id: 'filesystem' },
- // { title: 'Run Commands', id: 'filesystem' },
]
diff --git a/apps/docs/src/components/Layout.tsx b/apps/docs/src/components/Layout.tsx
index 9868aeacd..7681cfb1f 100644
--- a/apps/docs/src/components/Layout.tsx
+++ b/apps/docs/src/components/Layout.tsx
@@ -17,9 +17,10 @@ export function Layout({
allSections: Record<string, Array<Section>>
}) {
const pathname = usePathname()
+ const relativePathname = pathname.replace(new RegExp('^/docs'), '')
return (
- <SectionProvider sections={allSections[pathname] ?? []}>
+ <SectionProvider sections={allSections[relativePathname] ?? []}>
<div className="h-full lg:ml-72 xl:ml-80">
<motion.header
layoutScroll
diff --git a/apps/docs/src/components/Navigation.tsx b/apps/docs/src/components/Navigation.tsx
index 794ba394a..e69c1be0a 100644
--- a/apps/docs/src/components/Navigation.tsx
+++ b/apps/docs/src/components/Navigation.tsx
@@ -109,7 +109,7 @@ function VisibleSectionHighlight({ group, pathname }) {
initial={{ opacity: 0 }}
animate={{ opacity: 1, transition: { delay: 0.2 } }}
exit={{ opacity: 0 }}
- className="absolute inset-x-0 top-0 bg-zinc-800/2.5 will-change-transform dark:bg-white/2.5"
+ className="absolute inset-x-0 top-0 bg-zinc-800/5 will-change-transform dark:bg-white/5"
style={{ borderRadius: 8, height, top }}
/>
)
diff --git a/apps/docs/src/mdx/search.mjs b/apps/docs/src/mdx/search.mjs
index 7117cf970..7cf35f0af 100644
--- a/apps/docs/src/mdx/search.mjs
+++ b/apps/docs/src/mdx/search.mjs
@@ -44,8 +44,7 @@ function extractSections() {
}
}
-// eslint-disable-next-line i
-// mport/no-anonymous-default-export
+// eslint-disable-next-line import/no-anonymous-default-export
export default function (nextConfig = {}) {
let cache = new Map()