diff --git a/_plugins/inline-template.rb b/_plugins/inline-template.rb index 9de86591..36bfebbb 100644 --- a/_plugins/inline-template.rb +++ b/_plugins/inline-template.rb @@ -23,8 +23,11 @@ require 'yaml' def render(context) output = super + ## Workaround for inconsistent relative directory + path = File.expand_path(File.dirname(__FILE__)) + "/../" + data = YAML.load(output) - template = File.open(@template_name, mode="r") + template = File.open(path + @template_name, mode="r") @mytemplate = Liquid::Template.parse(template.read()) @mytemplate.render('entry' => data) end