github - 无法构建到 Github Pages

标签 github jekyll github-pages

我有一个 Jekyll 博客,我可以使用 bundle exec jekyll serve 在本地构建它但无法在 Github Pages 上构建。我 fork 了一个 theme , 跟随 setup instructions但无法弄清楚问题是什么。

错误消息没有提供任何详细信息:

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

Page build failed. For more information, see https://help.github.com/articles/troubleshooting-github-pages-builds/
.

For information on troubleshooting Jekyll see:

  https://help.github.com/articles/troubleshooting-jekyll-builds

我仔细阅读了他们的每条建议,但似乎没有一条适用于我的情况。

我的帐户和电子邮件已通过验证,并且我已经从中毫无问题地构建了其他几个 Github 页面。

我使用的唯一插件是:

gems:
  - jekyll-sitemap
  - jekyll-paginate
  - jekyll-gist
  - jekyll-feed

这些都是官方支持的。

repo 中的所有文件大约为 9 MB,远低于 1 GB 的限制。

没有覆盖 source在 _config.yml 中。

我是从 master 分支构建的,所以它与丢失的/docs 文件夹无关。

我认为我没有使用任何子模块。

我尝试将 _config.yml 中的 URL 留空,使其成为 https://<user_ID>/<repo_name>/ ,并使其成为https://<user_ID>/ baseurl 为 <repo_name>/ , 这些都没有用。

我可以尝试找出问题所在吗?

最佳答案

在你的标题中你有:

title:            Julius' Site

用双引号将其括起来以将其正确处理为字符串

title:            "Julius' Site"

然后修复 url:

url: "https://jss367.github.io/"
baseurl: "/hpstr-jekyll-theme"

更新

生成 feed.xml 的插件期望前端帖子中的 image 元素仅指定图像文件名,但您的 repo 中有更多键:

image:
  feature: abstract-3.jpg
  credit: dargadgetz
  creditlink: http://www.dargadgetz.com/ios-7-abstract-wallpaper-pack-for-iphone-5-and-ipod-touch-retina/

什么时候应该:

image:
  feature: abstract-3.jpg

解决方案是通过上述方式使用 image 修复帖子,如果您想将元数据附加到图像,请使用 jekyll 数据文件。

或简单删除:

_posts/2011-03-10-sample-post.md
_posts/2012-05-22-readability-post.md
_posts/2013-05-23-readability-feature-post.md
_posts/2013-08-16-code-highlighting-post.md

关于github - 无法构建到 Github Pages,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48344844/

相关文章:

git - 无法访问Github 403错误: Permission Denied

ruby - jekyll 服务依赖错误 - 无法打开 'lib curl'

页面上的 Jekyll 标签列表

reactjs - 无法部署 React 应用程序

github - 当内容存储在 docs 文件夹中时,如何通过自定义域提供 Github 页面?

git - 我们可以在不修改 gitconfigs 的情况下在 .gitattributes 文件中添加 merge --no ff

flask - 是否可以在 Github 操作的不同终端上运行命令?

git - 如何使用 sha of commit 在 github 上创建新分支

Git:如何在发生更多提交后纠正错误的 merge ?

安装 Octopress 时的 GitHub "ERROR: Repository not found"