我有一个基本的React应用程序。没有后端。我想在github页面上设置它。我读了这篇文章两次。https://medium.freecodecamp.org/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089
这两次,Github Pages都会显示我的公共文件夹中的index.html文件,而不是README.md文件。这是该应用程序的文件目录的图像。有什么想法吗?

如果重要的话,下面是我在package.json中拥有的:
{
"name": "react-blog",
"version": "0.1.0",
"private": true,
"homepage": "https://jackseabolt.github.io/react-blog/",
"dependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-scripts": "1.0.14"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy" : "npm run build&&gh-pages -d build"
},
"devDependencies": {
"gh-pages": "^1.0.0"
}
}发布于 2018-09-06 10:47:03
您的问题可能是您正在使用主分支作为源。在Github项目页面的设置选项卡中,将源代码更改为使用gh-pages分支。
https://stackoverflow.com/questions/46595320
复制相似问题