File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
components/Pages/BasePage Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ import { getMDXComponents } from "../../../mdx-components";
1212export function BasePage ( props : { params : { slug : string [ ] } } ) {
1313 const page = source . getPage ( props . params . slug ) ;
1414 if ( ! page ) notFound ( ) ;
15-
15+ // @ts -expect-error - body is a property of PageData, but not defined in the types
16+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
1617 const MDX = page . data . body ;
17-
1818 return (
19+ // @ts -expect-error - toc and full are properties of PageData, but not defined in the types so we need to cast to any
20+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
1921 < DocsPage toc = { page . data . toc } full = { page . data . full } >
2022 < DocsTitle > { page . data . title } </ DocsTitle >
2123 < DocsDescription > { page . data . description } </ DocsDescription >
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export async function getLLMText(page: InferPageType<typeof source>) {
1717 } ) ;
1818
1919 // note: it doesn't escape frontmatter, it's up to you.
20- return `# ${ page . data . title }
20+ return `# ${ page . data . title ?? "" }
2121URL: ${ page . url }
2222
2323${ String ( processed . value ) } `;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export const source = loader({
5757 source : docs . toFumadocsSource ( ) ,
5858 pageTree : {
5959 // types are very similar but not exactly the same
60- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
60+ // @ts -expect-error - some weird type issues
6161 transformers : [ openapiPlugin ( ) ] ,
6262 } ,
6363} ) ;
You can’t perform that action at this time.
0 commit comments