File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
- import { join } from "path"
2
-
3
1
import { MDXRemoteProps } from "next-mdx-remote"
4
2
import type { HTMLAttributes } from "react"
5
3
@@ -36,6 +34,7 @@ import YouTube from "@/components/YouTube"
36
34
37
35
import { cn } from "@/lib/utils/cn"
38
36
import { getEditPath } from "@/lib/utils/editPath"
37
+ import { addSlashes } from "@/lib/utils/url"
39
38
40
39
const baseHeadingClasses = "font-bold scroll-mt-40 break-words"
41
40
@@ -122,7 +121,6 @@ export const DocsLayout = ({
122
121
} : DocsLayoutProps ) => {
123
122
const isPageIncomplete = ! ! frontmatter . incomplete
124
123
const absoluteEditPath = getEditPath ( slug )
125
- const slugWithSlashes = join ( "/" , slug , "/" )
126
124
127
125
return (
128
126
< div className = "flex w-full flex-col border-b" >
@@ -136,7 +134,7 @@ export const DocsLayout = ({
136
134
className = "flex justify-between bg-background-highlight lg:pe-8"
137
135
dir = { contentNotTranslated ? "ltr" : "unset" }
138
136
>
139
- < SideNav path = { slugWithSlashes } />
137
+ < SideNav path = { addSlashes ( slug ) } />
140
138
< MainArticle className = "min-w-0 flex-1 px-8 pb-8 pt-8 md:px-16 md:pb-16 md:pt-12" >
141
139
< H1 id = "top" > { frontmatter . title } </ H1 >
142
140
< FileContributors
You can’t perform that action at this time.
0 commit comments