Skip to content

Commit

Permalink
fix Unhandled Runtime Error: No content found for <route> (shuding#663
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Dimitri POSTOLOV committed Aug 9, 2022
1 parent a917a91 commit bda343a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default MDXContent`.trimStart()
? `import __nextra_themeConfig__ from '${slash(path.resolve(themeConfig))}'`
: ''
const pageOpts: Omit<PageOpts, 'title'> = {
filename: slash(filename),
filename,
route: slash(route),
meta,
pageMap,
Expand All @@ -182,8 +182,7 @@ export default MDXContent`.trimStart()

const pageNextRoute =
'/' +
path
.relative(pagesDir, resourcePath)
slash(path.relative(pagesDir, resourcePath))
// Remove the `mdx?` extension
.replace(MARKDOWN_EXTENSION_REGEX, '')
// Remove the `*/index` suffix
Expand Down

0 comments on commit bda343a

Please sign in to comment.