简体   繁体   English

我的 pero 中是否需要 gh-pages 文件夹来托管 React 应用程序?

[英]Do I need gh-pages folder in my pero to host react app?

I know two ways of hosting an app.我知道托管应用程序的两种方式。 1) You either go to settings and set source branch and select folder. 1)您将 go 设置为设置并设置源分支和 select 文件夹。 2) Or you can follow some steps like npm --save install gh-pages, npm run deploy and so on.. I tried to host my app the 1st way, but it shows readme file and it doesn't see index.html in public folder. 2) 或者您可以按照 npm --save install gh-pages、npm run deploy 等一些步骤进行操作。我尝试以第一种方式托管我的应用程序,但它显示自述文件并且看不到 index.ZFC3639FDC70D2FCCA783在公共文件夹中。

The " Configuring a publishing source for your GitHub Pages site " does mention choosing a branch and folder. 为您的 GitHub 页面站点配置发布源”确实提到了选择分支和文件夹。

But:但:

  • gh-pages is always a branch, not a folder. gh-pages始终是一个分支,而不是一个文件夹。
  • the folder referenced in the documentation seems only to be /docs : try for testing your index.html in docs/ rather than public/ .文档中引用的文件夹似乎只是/docs :尝试在docs/而不是public/中测试您的 index.html 。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM