无法在 github 上发布静态网站

Can not publishing static site on github

我正在尝试发布一个静态网页,但它在下面显示了这个错误。

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.

我做对了一切 在我的电子邮件中发送一个错误:

The page build failed for the master branch with the following error:

No `/docs` folder was found to build GitHub Pages. Check the source setting for this repository.

它写在电子邮件中(检查存储库的源设置);)

存储库页面 -> 设置 -> GitHub 页面 -> 来源 -> select rootdocs

大多数项目的静态 html 位于 /docs

  • 更改默认值 /docs -> /
  • 或将内容移动到文件夹 /docs

Github 页面在 repo 的根目录下需要一个 index.html,也许可以解决这个问题