react-gh-pages icon indicating copy to clipboard operation
react-gh-pages copied to clipboard

Create-react-app automatically puts index.html in public

Open brookebachman opened this issue 5 years ago • 1 comments

I had an issue where the read me was the only thing on Github pages. Add to the documentation that they have to have their index.html outside of all folders.

brookebachman avatar Sep 03 '20 01:09 brookebachman

Hi @brookebachman, thanks for sharing your experience here and suggesting an edit to the tutorial. Sorry I waited so long to respond, which has been the case with respect to many of the Issues here. I'm starting to catch up with them.

I'll respond here as though this is a fresh Issue, but I understand it is 17 months old and may no longer be affecting you. As far as I'm concerned, you can close this Issue without responding to the questions I post below.


Add to the documentation that they have to have their index.html outside of all folders.

I don't understand what you meant by "outside of all folders."

create-react-app (e.g. via $ npx create-react-app my-app) creates the index.html file in the root of the public/ folder by default. I have always left it there in my projects and, with it there, have been able to successfully deploy React apps to GitHub Pages using the process described in the tutorial (as shown here).

image

image

By "outside of all folders," do you mean the file has to be in the root of the repository, itself, as opposed to in the root of the public/ folder?

gitname avatar Feb 16 '22 19:02 gitname

Closing due to lack of response (10 months).

gitname avatar Dec 02 '22 23:12 gitname