【问题标题】:Unable to build to Github Pages无法构建到 Github 页面
【发布时间】:2018-06-28 21:58:32
【问题描述】:

我有一个 Jekyll 博客,可以使用 bundle exec jekyll serve 在本地构建,但无法在 Github 页面上构建。我分叉了一个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 的限制。

_config.yml 中没有覆盖 source

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

我不相信我在使用任何子模块。

我尝试将 _config.yml 中的 URL 留空,将其设为 https://<user_ID>/<repo_name>/,并将其设为 https://<user_ID>/,baseurl 为 <repo_name>/,但均无效。

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

【问题讨论】:

  • 任何存储库网址?
  • 尝试在 Gemfile 中仅使用 gem 'github-pages' 进行本地调试。提要插件有问题。我的建议是找到另一个更简单的主题,这个主题远非完美。

标签: github jekyll github-pages


【解决方案1】:

在你的标题中你有:

title:            Julius' Site

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

title:            "Julius' Site"

然后修复网址:

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

【讨论】:

  • 我进行了这些更改并得到了同样的错误。我也尝试了双引号中的描述,但仍然没有。
  • 在设置/Jekyll 构建失败消息中发布错误消息
  • 如果我转到 Settings->Github Pages,我会看到以下错误:您的站点在构建时遇到问题:页面构建失败。有关详细信息,请参阅help.github.com/articles/troubleshooting-github-pages-builds
猜你喜欢
  • 2018-11-07
  • 2016-04-13
  • 2019-04-27
  • 2021-05-08
  • 2013-03-05
  • 1970-01-01
  • 2015-03-12
  • 2018-07-24
  • 2020-04-09
相关资源
最近更新 更多