【发布时间】:2019-07-15 12:48:35
【问题描述】:
我正在使用 jekyll 运行博客。我尝试在 docker 上使用 jekyll,但出现以下错误:
Error: A Liquid tag in the excerpt of _posts/2019-05-21-jekyll-caching.md couldn't be parsed.
Error: could not read file /srv/jekyll/_posts/2019-05-21-jekyll-caching.md: undefined method `ancestors' for nil:NilClass
在错误文件中,我写了一个小技巧,让流水语句变成html。以下是博客内容:
(...)
Liquid 是 Shopify 在 html 之上以{{" {% include head.html "}}%} 格式编写的模板语言。
使用{{"{% include head.html"}}%} 看起来像一个错误,但直到在 docker 上运行 jekyll 才出现此错误。我在google上搜索,我找不到错误的原因并询问stackoverflow。请注意,尽管出现错误,但服务器运行良好。
如果您需要知道更多信息来回答,请告诉我。
【问题讨论】: