使用 Jekyll 使用 Github 页面推送网站后得到一个空白页面

Get a blank page after pushing a site using Github pages with Jekyll

我用 Jekyll 创建了一个 GitHub 页面站点。浏览 http://localhost:4000.

时一切正常

然后我推到了GitHub,但是访问https://USERNAME.github.io/.

什么也没有(空白页,没有报错,没有内容)

Gemfile

的内容
source "https://rubygems.org"
ruby RUBY_VERSION

gem "minima", "~> 2.0"

gem "github-pages", group: :jekyll_plugins

group :jekyll_plugins do
   gem "jekyll-feed", "~> 0.6"
end

我的 repo 的结构,(为什么 _site 没有上传?)

_posts        Initial commit for Jekyll             23 hours ago
.gitignore    Initial commit for Jekyll             23 hours ago
Gemfile       Uncomment some lines for GitHub Pages 23 hours ago
Gemfile.lock  Initial commit for Jekyll             23 hours ago
_config.yml   Initial commit for Jekyll             23 hours ago
about.md      Initial commit for Jekyll             23 hours ago
index.md      Initial commit for Jekyll             23 hours ago

我是否遗漏了一些步骤?

_site 未上传,因为它在您的 .gitignore 文件中。

"GitHub Pages manages your site's build process with a single push to your site's publishing branch"这样就不需要上传建站文件了

确认您的网站是从您想要的源文件夹构建的。参见 these instructions

我在尝试使用 GitHub 页面不支持的 theme 时遇到了类似的问题。

然后我发现 GitHub 页面支持自定义主题:https://blog.github.com/2017-11-29-use-any-theme-with-github-pages/

例如,在我的例子中,我想使用 gem 中的这个主题:https://github.com/mmistakes/minimal-mistakes

我不得不添加 remote_theme: remote_theme: mmistakes/minimal-mistakes

而不是在 _config 中更改 theme