bug (v2) html files with underscore prefix returning 404
See original GitHub issue🐛 Bug Report
HTML files in static dir with underscore prefix are not resolved. Page shows Page Not Found. Only resolves underscores when running docusaurus start.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
- Create a new project with docusaurus
- add
_foo.htmltostaticdir - publish to github pages
Expected behavior
_foo.html page should be resolved. Behavior should be consistent between dev and prod builds.
Actual Behavior
_foo.html page shows Page Not Found
Your Environment
- Docusaurus version used: latest v2
- Environment name and version consistent across all browsers, node 13.2.0
- Operating system and version (desktop or mobile): macOS desktop
Reproducible Demo
https://github.com/amilajack/my-website
this works https://github.com/amilajack/my-website/foo.html
this does not work https://github.com/amilajack/my-website/_foo.html
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
404 Error on all github pages except for index.html (no ...
I've been looking for a solution through other posters but unlike (Github Pages 404 for everything but index.html) I don't have any underscores...
Read more >Pitfalls and Common Mistakes | NGINX
This page outlines some of the NGINX configuration issues that we see frequently and then explains how to resolve them.
Read more >Error Messages | Maps JavaScript API - Google Developers
This behavior typically indicates issues with either an API key or billing. In order to use Google Maps Platform products, billing must be...
Read more >API - ESBuild
The build API call operates on one or more files in the file system. ... If esbuild returns "not found", send a custom...
Read more >OpenAPI Specification v3.0.3 | Introduction, Definitions, & More
(OAS 2.0 documents contain a top-level version field named swagger and value "2.0" .) 4.2 Format §. An OpenAPI document that conforms to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is interesting! While it’s not a Docusaurus bug, I recommend we document these weird behaviors down in a new FAQ page or something - maybe https://v2.docusaurus.io/docs/faq? I can think of more stuff to add into it (e.g. some prerendering-related issues).
@amilajack would you be interested in creating one?
Even if we don’t add it as an FAQ page on our site, we can create a Stack Overflow question so that the knowledge is shared and people can discover it easily.
I’d love to document this. I was wondering what the correct place to document this was. I was thinking of adding it to the “publishing with GitHub pages” section. What are your recommendations?