【问题标题】:Github Pages throws `Page build failure` for Jekyll siteGithub Pages 为 Jekyll 网站抛出“页面构建失败”
【发布时间】:2018-07-18 10:58:34
【问题描述】:

回购:https://github.com/FisherKK/F1sherKK-Online

我是 Jekyll 的新手,并且在单次提交中推动了许多更改,现在我很难说出问题出在哪里。我正在编辑最小布局。 GitHub 返回一般错误:

页面构建失败。有关详细信息,请参阅 https://help.github.com/articles/troubleshooting-github-pages-builds/.

有关 Jekyll 故障排除的信息,请参阅:

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

如果您有任何问题,可以通过回复此邮件与我们联系 电子邮件。

我顺利运行bundle update 并且页面在本地工作:

$ bundle exec jekyll build Configuration file: /Users/F1sherKK/Dev/F1sherKK-Online/_config.yml
            Source: /Users/F1sherKK/Dev/F1sherKK-Online
       Destination: /Users/F1sherKK/Dev/F1sherKK-Online/_site  Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 0.523 seconds.  
      Auto-regeneration: disabled. Use --watch to enable.

我尝试了以下方法:

  1. 根据:Github page build failure
    • 我已经确认我只使用了gh-pages 分支。
    • 我已经确认我没有添加任何 _ 起始文件夹(Jekyll 使用的文件夹除外)
    • 我已添加 .nojekyll 文件,但我的网站完全崩溃(404,白色,无布局),因此我已将其删除。
  2. 根据:jekyll page build failure
  3. 根据:"page build failed" when pushing a new blog post to github
    • 确认我的类别(例如 categories: machine_learning deep_learning history)不在列表 [] 括号中。
  4. 根据:Adding of any html file from the minima/_includes directory into the website directory cause the github build to fail
    • 我认为我没有接触过head.html 文件中的任何内容。

我想我会把它发送到 support@github.com 因为我读过他们也在解决这些问题......

【问题讨论】:

    标签: git jekyll github-pages


    【解决方案1】:

    正如我从您的存储库的提交历史中看到的,问题现在已解决,但我想添加一个解释。

    页面构建首先失败,提交6759bff。在这次提交中,我注意到您添加了一个名为 jekyll-inline-svg 的 Jekyll 插件。

    GitHub Pages 仅支持a small set of pluginsjekyll-inline-svg 不在此列表中。

    你看,当你在提交86df50b中删除这个插件时,页面构建又成功了。

    结论:如果你使用 GitHub Pages 渲染你的网站,你应该只使用他们支持的插件。

    另一种解决方案是在本地呈现您的网站,然后将 _site 目录的内容上传到您的 GitHub 存储库。在这种情况下,您必须在 GitHub Pages 上将 .nojekyll 添加到 turn off rendering

    这也在 “Generic Jekyll build failures”中进行了解释 troubleshooting page:

    GitHub Pages 服务器不会使用不受支持的插件构建。在您的站点中合并不受支持的插件的唯一方法是在本地生成站点,然后将站点的静态文件推送到您的 GitHub Pages 站点。

    【讨论】:

      猜你喜欢
      • 2015-03-12
      • 1970-01-01
      • 2017-11-08
      • 2017-03-03
      • 1970-01-01
      • 1970-01-01
      • 2020-03-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多