Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github pages returns readme file instead of index.html. Can't host my react project

I have problem with host my react project on gh-pages. i Have my repo on github ----> GitHub repo My page return readme file instead of indx.html (public/index.html). ---> My Page

What should i do to my page with my react app works correctly?

like image 677
Lukas Avatar asked May 11 '17 14:05

Lukas


People also ask

Why is GitHub Pages showing readme React?

The reason why you see your README.md file being rendered instead of your app is because you have not generated the browser-friendly static assets (HTML, CSS, and JavaScript) needed for your app to run in the browser. Luckily, Create-React-App offers a built-in solution to help you bundle your assets with one command.

Can you host a React project on GitHub Pages?

The simplicity of deploying a static website with GitHub Pages is a process that can be easily transferred to React applications. With just a few steps, it's easy to host a React app on GitHub Pages for free or build it to deploy on your own custom domain or subdomain.

Does GitHub Pages support React JS?

Your React application is published on GitHub pages and if you want to verify it just go to the settings tab of your application in your Github repository and scroll down.


1 Answers

In my experience, it was simply a latency issue. When I initially committed index.html (in the root of the repo), myorg.github.io continued to serve README.md. After a few hours, I returned and tried it again - lo and behold my index.html was served. Because of the time I was away, I can't make a guess about how long it takes github pages to update.

like image 93
Jim Reesman Avatar answered Sep 20 '22 14:09

Jim Reesman