File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -251,8 +251,9 @@ export default defineConfig({
251251 }
252252 }
253253
254- if ( ( description == null || description === "" ) && pageData . filePath && ! pageData . filePath . startsWith ( "api/" ) ) {
255- const excerpt = await getExcerptFromMarkdownFile ( await fs . readFile ( path . join ( docsDir , pageData . filePath ) , "utf8" ) ) ;
254+ const markdownFilePath = path . join ( docsDir , pageData . filePath ) ;
255+ if ( ( description == null || description === "" ) && await fs . pathExists ( markdownFilePath ) && ! pageData . filePath . startsWith ( "api/" ) ) {
256+ const excerpt = await getExcerptFromMarkdownFile ( await fs . readFile ( markdownFilePath , "utf8" ) ) ;
256257 if ( excerpt != null && excerpt !== "" )
257258 description = excerpt . replaceAll ( '"' , "'" ) . replaceAll ( "\n" , " " ) ;
258259 }
You can’t perform that action at this time.
0 commit comments