evidence icon indicating copy to clipboard operation
evidence copied to clipboard

Directories without index pages throw error during build/deployment

Open hughess opened this issue 3 years ago • 0 comments

Bug Description If your project contains a directory without an index.md file within it, running build will throw a 404 error. This is because a link for the missing page gets included in the breadcrumbs at the top of the page.

Expected Behavior The missing page should appear in the breadcrumbs as text only, rather than a link.

Steps To Reproduce

  1. Create a new, empty directory

  2. Add a markdown file to the directory (any name other than index.md)

  3. Navigate to that markdown page in your app CleanShot 2022-07-08 at 14 17 12@2x

  4. Click the name of the folder in the breadcrumb - you should see a "not found" error CleanShot 2022-07-08 at 14 17 19@2x

  5. Run npm run build - you should see a 404 error CleanShot 2022-07-08 at 14 34 07@2x

Workarounds

  • Add an index.md file to all directories

hughess avatar Jul 08 '22 18:07 hughess