Getting an “Unknown tag”/Liquid error while using Jekyll

丶灬走出姿态 提交于 2020-07-07 07:32:14

问题


I did a bundle update for my Jekyll site, then tried to run bundle exec jekyll serve. I got the following console message:

Liquid Exception: Liquid syntax error (line 8): Unknown tag 'when' in vendor/bundle/ruby/2.4.0/gems/liquid-4.0.0/lib/liquid/locales/en.yml

I've tried the following:

  • uninstall/reinstall Jekyll

  • uninstall/reinstall Gems

  • uninstall/reinstall Ruby

  • install RVM

  • do rm Gemfile.lock

  • run bundle update

Curiously, when I run rvm list, it says * ruby-2.4.1 [ x86_64 ]. Even though the error message says is looking at 2.4.0. I then ran rvm list known to find version 4.0.0 but it wasn't listed.

Thanks in advance.


回答1:


In you Jekyll directory:

Remove bundle config and gems:

rm -r .bundle
rm -r vendor

Install gems with bundle:

bundle install

Run jekyll with it:

bundle exec jekyll s



回答2:


For reference, when I got this error it was because of a badly formed exclude command in _config.yml



来源:https://stackoverflow.com/questions/47565390/getting-an-unknown-tag-liquid-error-while-using-jekyll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!