File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 DocsTitle ,
77} from "fumadocs-ui/page" ;
88import { notFound } from "next/navigation" ;
9+ import { LLMCopyButton , ViewOptions } from "@/components/page-actions" ;
910import { source } from "@/lib/source" ;
1011import { getMDXComponents } from "@/mdx-components" ;
11- import { LLMCopyButton , ViewOptions } from "@/components/page-actions" ;
1212
1313export default async function Page ( props : {
1414 params : Promise < { slug ?: string [ ] } > ;
@@ -29,14 +29,13 @@ export default async function Page(props: {
2929 < DocsTitle > { page . data . title } </ DocsTitle >
3030 < DocsDescription > { page . data . description } </ DocsDescription >
3131 < DocsBody >
32- < div className = "flex flex-row gap-2 items-center border-b pt-2 pb-6" >
33-
34- < LLMCopyButton markdownUrl = { `${ page . url } .md` } />
35- < ViewOptions
36- markdownUrl = { `${ page . url } .md` }
37- githubUrl = { `https://github.com/OpenZeppelin/docs/blob/main/content/${ page . path } ` }
38- />
39- </ div >
32+ < div className = "flex flex-row gap-2 items-center border-b pt-2 pb-6" >
33+ < LLMCopyButton markdownUrl = { `${ page . url } .md` } />
34+ < ViewOptions
35+ markdownUrl = { `${ page . url } .md` }
36+ githubUrl = { `https://github.com/OpenZeppelin/docs/blob/main/content/${ page . path } ` }
37+ />
38+ </ div >
4039 < MDXContent
4140 components = { getMDXComponents ( {
4241 // this allows you to link to other pages with relative file paths
Original file line number Diff line number Diff line change 1- import { source } from "@/lib/source" ;
21import { getLLMText } from "@/lib/get-llm-text" ;
2+ import { source } from "@/lib/source" ;
33
44// cached forever
55export const revalidate = false ;
Original file line number Diff line number Diff line change 1- import { type NextRequest , NextResponse } from ' next/server' ;
2- import { getLLMText } from '@/lib/get-llm-text' ;
3- import { source } from ' @/lib/source' ;
4- import { notFound } from 'next/navigation' ;
1+ import { notFound } from " next/navigation" ;
2+ import { type NextRequest , NextResponse } from "next/server" ;
3+ import { getLLMText } from " @/lib/get-llm-text" ;
4+ import { source } from "@/lib/source" ;
55
66export const revalidate = false ;
77
88export async function GET (
9- _req : NextRequest ,
10- { params } : { params : Promise < { slug ?: string [ ] } > } ,
9+ _req : NextRequest ,
10+ { params } : { params : Promise < { slug ?: string [ ] } > } ,
1111) {
12- const { slug } = await params ;
13- const page = source . getPage ( slug ) ;
14- if ( ! page ) notFound ( ) ;
12+ const { slug } = await params ;
13+ const page = source . getPage ( slug ) ;
14+ if ( ! page ) notFound ( ) ;
1515
16- return new NextResponse ( await getLLMText ( page ) ) ;
16+ return new NextResponse ( await getLLMText ( page ) ) ;
1717}
1818
1919export function generateStaticParams ( ) {
20- return source . generateParams ( ) ;
20+ return source . generateParams ( ) ;
2121}
You can’t perform that action at this time.
0 commit comments