Jekyll Liquid 错误,没有将 Integer 隐式转换为 String。生成帖子时给出的零信息和中断

Jekyll Liquid Error, no implicit conversion of Integer to String. Zero information given and breaks when posts are generated

我推送到 github 页的网站有问题。

我的 Gemfile 有 github 页 gem 并且 jekyll gem 已被注释掉。

该错误没有提供任何关于文件路径 (/_layout/defaults.html) 的错误发生位置的信息,该文件路径在我的项目中不存在。建筑不起作用,网站服务也不起作用。如果有人可以指出我在哪里可以找到更多信息或之前遇到过这个问题,那就太棒了!

---
title: "New Website, First Post"
layout: post
date: '2019-10-08'
categories: hyperlisk first
---

Hello World! This is my first ever jekyll post on my website. This is a new experiece and I would like to thank Evan Pratten (@ewpratten) for creating most of this website for me.
Go to his <a href="https://retrylife.ca">website</a>, he has some cool stuff over there! This blog will contain cool things I discover, tutorials and possible some updates to bigger projects I am working on. One such project called HyperEngine. That will be explained in a later post. The post directly following it will be a giant post about linear algebra and something called Optimal Control Theory. 

^^ 那是唯一的 post 并且在为 post 生成提要后立即发生错误 谢谢!

您可能需要添加 default 布局;听起来您的配置中的其他一些文件正在要求它。您收到的错误消息表明您的代码中的其他地方引用了此布局模板。 (如果您可以共享指向您的存储库的指针,它将有助于更具体地回答您的问题!)

特别是,除非你对你的配置做一些时髦的事情,否则 Jekyll 倾向于期望你有一个 _default.html 布局。 请参阅 jekyll 文档 here.

您可以像这样添加最小布局(取自上面链接的页面):

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>{{ page.title }}</title>
  </head>
  <body>
    {{ content }}
  </body>
</html>

此错误通常表明您正试图将某些值转换为另一种(不兼容的)类型。例如,请参阅 this question,其中用户 运行 在尝试将整数转换为转义字符串时遇到类似错误。

(我还建议克隆一个现有的 jekyll 网站,这样你就可以确保你有一个有效的安装。)