我有一个 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/