Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug (v2) html files with underscore prefix returning 404 #2332

Closed
amilajack opened this issue Feb 26, 2020 · 7 comments · Fixed by #2340
Closed

bug (v2) html files with underscore prefix returning 404 #2332

amilajack opened this issue Feb 26, 2020 · 7 comments · Fixed by #2340
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers

Comments

@amilajack
Copy link
Contributor

amilajack commented Feb 26, 2020

🐛 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.

Screen Shot 2020-02-26 at 11 14 25 AM

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Create a new project with docusaurus
  2. add _foo.html to static dir
  3. 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

Screen Shot 2020-02-26 at 11 14 25 AM

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

@amilajack amilajack added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Feb 26, 2020
@lex111
Copy link
Contributor

lex111 commented Feb 26, 2020

This is not a Docusaurus bug, if you add the .nojekyll file to the gh-pages branch, this error will disappear.

See:

@lex111 lex111 closed this as completed Feb 26, 2020
@amilajack
Copy link
Contributor Author

@lex111 thanks! Also do you think docusarus should add the .nojekyll file by default?

@lex111
Copy link
Contributor

lex111 commented Feb 26, 2020

@amilajack no, I don’t think so, because this is an issue that applies only to GitHub Pages (in this case), and we should not care about this, since our task as a static site generator is to generate the proper build of website.

@yangshun
Copy link
Contributor

yangshun commented Feb 27, 2020

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.

@yangshun yangshun reopened this Feb 27, 2020
@amilajack
Copy link
Contributor Author

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?

@lex111
Copy link
Contributor

lex111 commented Feb 27, 2020

I like this idea, it will be more convenient and predictable for users than creating a separate section (FAQs) for this. Although maybe in the future it might be worth writing something like that.

@yangshun
Copy link
Contributor

Adding it to the "Publishing with GitHub pages" section sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants