Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
117 views
in Technique[技术] by (71.8m points)

reactjs - What's the proper file order?

I'm new to coding and built a couple websites using react; however, once deployed onto github pages the readme is what the browser is showing. It either shows the readme because its at the root or once moved to the root it still cannot find the index.html file because it looked in the public folder.

question from:https://stackoverflow.com/questions/65893886/whats-the-proper-file-order

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

GitHub isn't a normal web host from which you can host a website. It is meant for versioning and sharing source code, including of web pages but of other languages too. Because of this, viewing a repository on GitHub defaults to showing the README.md file, which is what most other developers would want to know.

There are a few ways you can get GitHub to do what you're describing, i.e. serving raw files, including a service they offer called GitHub Pages but it's probably not as fully featured as what you're looking for. Instead, find a web host (just google it, there's thousands) and set up a cheap account. Shouldn't cost you more than a couple dozen USD a year.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...