mystmd
mystmd copied to clipboard
Directory named build/ causes 404 errors during static HTML build
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/websiteworks (200)/build.index.jsonworks (200)/buildand/build/both fail (404)- Server tries to fetch
/buildroute which doesn't exist
How I worked around it
Renaming directory to anything else (e.g., build-and-publish/) fixes the issue completely.