Skip to content

Commit 8cf69f1

Browse files
authored
Merge pull request #15539 from JoeChenJ/Fix_SideNav_items_open
fix: correct path passed to SideNav
2 parents 119d7d4 + d229b3f commit 8cf69f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/layouts/Docs.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import YouTube from "@/components/YouTube"
3434

3535
import { cn } from "@/lib/utils/cn"
3636
import { getEditPath } from "@/lib/utils/editPath"
37+
import { addSlashes } from "@/lib/utils/url"
3738

3839
const baseHeadingClasses = "font-bold scroll-mt-40 break-words"
3940

@@ -133,7 +134,7 @@ export const DocsLayout = ({
133134
className="flex justify-between bg-background-highlight lg:pe-8"
134135
dir={contentNotTranslated ? "ltr" : "unset"}
135136
>
136-
<SideNav path={slug} />
137+
<SideNav path={addSlashes(slug)} />
137138
<MainArticle className="min-w-0 flex-1 px-8 pb-8 pt-8 md:px-16 md:pb-16 md:pt-12">
138139
<H1 id="top">{frontmatter.title}</H1>
139140
<FileContributors

0 commit comments

Comments
 (0)