Why isn't my page loading up on Github?

青春壹個敷衍的年華 提交于 2019-12-04 06:52:02

问题


I am trying to point my repo to a custom domain and receiving this error:

404 File not found

The site configured at this address does not contain the requested file. If this is your site, make sure that the filename case matches the URL. For root URLs (like http://example.com/) you must provide an index.html file.

Here is my repo: https://github.com/rohithpalagiri/rohithpalagiri.github.io

Here is the custom url: rohithpalagiri.com

I looked at my namecheap setting and it was set up correctly. Does anyone know if it's something in my code that's causing the issue?


回答1:


It currently takes the master branch.

Go in the repo settings and choose the gh-pages branch. Then click Save.




回答2:


Hi you don't actually need a gh-pages branch for this repo, since you are using username.github.io, your master branch will do just fine. Think of github as the directory you are serving from, and it cannot find your index.html - it doesn't know to search inside of your build/ or src/ directories for it. So you could just have your index.html open in the repo and link from there, or pull your build out and make that your repo. Your master branch will work just fine, and keep the cname



来源:https://stackoverflow.com/questions/39837559/why-isnt-my-page-loading-up-on-github

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!