使用带有Jekyll的Github页面推送网站后获得空白页面 [英] Get a blank page after pushing a site using Github pages with Jekyll

查看:98
本文介绍了使用带有Jekyll的Github页面推送网站后获得空白页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Jekyll创建了一个GitHub Pages网站.浏览到 http://localhost:4000 时,一切都很好.

I created a GitHub Pages site with Jekyll. Everything is fine when browsing to http://localhost:4000.

然后我将其推送到GitHub,但是访问 https:时,没有任何内容(空白页,没有错误,没有内容): //USERNAME.github.io/.

Then I pushed it to GitHub, but there is nothing (blank page, no error, no content) when accessing 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

我的仓库的结构(为什么_site没有上传?)

The structure of my repo, (why is _site not uploaded?)

_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尚未上传,因为它位于您的

_site was not uploaded because it is in your .gitignore file.

"GitHub页面管理您网站的只需将其推到站点的发布分支即可构建过程" ,因此您无需上载已构建站点的文件.

"GitHub Pages manages your site's build process with a single push to your site's publishing branch" so you do not need to upload the files of a built site.

验证您的站点是从所需的源文件夹中构建的.参见

Verify your site is being built from the source folder you intend. See these instructions.

这篇关于使用带有Jekyll的Github页面推送网站后获得空白页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆