diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index 0184a6a4..b41c03bc 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -55,7 +55,7 @@ eos return error end - source = File.read(File.join(includes_dir, @file)) + source = read_file(File.join(includes_dir, @file)) partial = Liquid::Template.parse(source) context.stack do @@ -77,13 +77,17 @@ eos if !File.exists?(file) return "Included file #{@file} not found in _includes directory" elsif File.symlink?(file) - return "The included file '_includes/#{@file}' should not be a symlink" + return "The included file '_includes/#{file}' should not be a symlink" end end def blank? false end + + def read_file(file) + return File.read(file) + end end end end