mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Directory named build/ causes 404 errors during static HTML build

Open choldgraf opened this issue 1 month ago • 0 comments

Content directories named build/ trigger repeated 404 errors during jupyter book build --html, causing builds to fail in strict mode.

Example project structure:

docs/
├── myst.yml
└── build/
    └── index.md

TOC in myst.yml:

toc:
  - title: Build & Publish
    file: build/index.md

Here's that the logs look like

GET /build/website 200 - - 19.628 ms
Fetch of http://localhost:3024/build failed with HTTP status 404 (Attempt #1)
GET /build/ 404 - - 21.588 ms
Fetch of http://localhost:3024/build failed with HTTP status 404 (Attempt #2)
GET /build/ 404 - - 4.623 ms
Fetch of http://localhost:3024/build failed with HTTP status 404 (Attempt #3)
Failed to fetch http://localhost:3024/build after 3 attempts.

Note:

  • /build/website works (200)
  • /build.index.json works (200)
  • /build and /build/ both fail (404)
  • Server tries to fetch /build route which doesn't exist

How I worked around it

Renaming directory to anything else (e.g., build-and-publish/) fixes the issue completely.

choldgraf avatar Nov 01 '25 18:11 choldgraf