File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
apps/docs/app/(docs)/[[...slug]] Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ export default async function Page(props: PageProps<"/[[...slug]]">) {
2020 }
2121
2222 const MDXContent = page . data . body ;
23+ const parsedUrl = page . url === "/" ? "/index" : page . url ;
24+ const markdownUrl = `/elements${ parsedUrl } .mdx` ;
2325
2426 return (
2527 < DocsPage
@@ -35,10 +37,10 @@ export default async function Page(props: PageProps<"/[[...slug]]">) {
3537 < DocsTitle > { page . data . title } </ DocsTitle >
3638 < DocsDescription > { page . data . description } </ DocsDescription >
3739 < div className = "-mt-8 mb-8 flex flex-row items-center gap-2" >
38- < LLMCopyButton markdownUrl = { ` ${ page . url } .mdx` } />
40+ < LLMCopyButton markdownUrl = { markdownUrl } />
3941 < ViewOptions
4042 githubUrl = { `https://github.com/vercel/ai-elements/blob/main/apps/docs/content/docs/${ page . path } ` }
41- markdownUrl = { ` ${ page . url } .mdx` }
43+ markdownUrl = { markdownUrl }
4244 />
4345 </ div >
4446 < DocsBody >
You can’t perform that action at this time.
0 commit comments