【问题标题】:Jekyll custom theme not working on Github pagesJekyll 自定义主题在 Github 页面上不起作用
【发布时间】:2019-06-24 08:33:06
【问题描述】:

我有一个 jekyll 站点,我想将其部署为 github 页面。它可以独立工作,但无法在 github-pages 中构建,并且包含来自 _index.html 的错误。我什至没有 _include 目录。我正在使用最小错误主题。我已将我的网站精简到可以在https://github.com/laredo/mm-jekyll 找到的裸露的骨头

确切的错误是:index.html 中包含一个作为符号链接的文件或在您的_includes 目录中不存在。

https://github.com/laredo/mm-jekyll/blob/master/index.html

寻找成功构建网站的建议

【问题讨论】:

    标签: jekyll github-pages


    【解决方案1】:

    在你的 _config.yml 中

    • 删除theme: minimal-mistakes-jekyll
    • 添加remote_theme: mmistakes/minimal-mistakes
    • 在插件配置中启用 jekyll-include-cache

    插件配置现在:

    plugins:
      - jekyll-feed
      - jekyll-include-cache
    

    【讨论】:

    • 您还需要将 gem 添加到 Gemfile 中:gem 'jekyll-include-cache',以便它继续在本地为您的开发工作。
    • 感谢您对帖子的回复和编辑,但问题是 - 为什么要编辑主题行?主题行中的错误字符串将帮助更多人找到问题
    • 可以在此处找到与此答案相关的更多详细信息:github.com/mmistakes/minimal-mistakes/issues/1937
    【解决方案2】:

    我有一个基于 Jekyll 和 Minimal Mistakes 的博客。它已经托管在 github-pages 中。我不知道你是如何开始你的项目的,但对我有用的只是克隆 minimal mistakes Github repository 并更改 _config.yml。

    【讨论】:

    • 您的 _config.yml 应该取消注释 remote_theme 行,如果不是通过该行,您如何引用该主题?
    猜你喜欢
    • 2017-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-29
    • 2022-12-13
    • 1970-01-01
    相关资源
    最近更新 更多