Jekyll过滤插件错误"未定义的方法` - @' for:liquify:Symbol"

时间:2017-03-30 19:19:31

标签: ruby plugins jekyll liquid

我试图使用Jekyll插件在YAML前端扩展嵌套的液体变量,但在尝试在本地运行该站点后收到以下控制台错误:

$ jekyll serve -w
Configuration file: /Users/consortia/Documents/consortia2017-v4/_config.yml
Configuration file: /Users/consortia/Documents/consortia2017-v4/_config.yml
jekyll 3.4.0 | Error:  undefined method `-@' for :liquify:Symbol

我的插件文件(liquify_filter.rb)的代码如下:

---
---

module Jekyll
  module LiquifyFilter
    def liquify(input)
      output = Liquid::Template.parse(input)
      output.render(@context)
    end
  end
end

Liquid::Template.register_filter(Jekyll::LiquifyFilter)

任何帮助或建议将不胜感激!谢谢!

0 个答案:

没有答案