gitname / react-gh-pages

Deploying a React App (created using create-react-app) to GitHub Pages
6.47k stars 913 forks source link

Please add --nojekyll flag #200

Open ianor opened 3 weeks ago

ianor commented 3 weeks ago

Category

Which of these applies to you? (Select all that apply)

Step

Which step of the tutorial do you want someone to help you with? (Select one)

Links

Tell us where we can find your code and your GitHub Pages site:

Everything else

I struggled for an hour to figure out why my app wasn't deploying, and it was because I 1) didn't have a Jekyll configuration, and 2) had not included a .nojekyll file in my build. So, the instructions as there are today didn't work out of the box, at least for me. Rather, gh-pages accepts a --nojekyll flag that tells it to add a .nojekyll file to the deploy.

So, if you update your Readme (step 5, sub-step 2) to + "deploy": "gh-pages -d build --nojekyll", then you will save others like me from falling into the same pit. Of course, feel free to link the documentation about Jekyll or anything else you like, but at least this will make your instructions work out of the box for others like me.

Thanks!

...