mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Merge pull request #1746 from maul-esel/missing-include
output including file for include tag error
This commit is contained in:
@@ -87,7 +87,7 @@ module Jekyll
|
||||
def render_liquid(content, payload, info, path = nil)
|
||||
Liquid::Template.parse(content).render!(payload, info)
|
||||
rescue Tags::IncludeTagError => e
|
||||
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{e.path}"
|
||||
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{e.path}, included in #{path || self.path}"
|
||||
raise e
|
||||
rescue Exception => e
|
||||
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{path || self.path}"
|
||||
|
||||
@@ -96,14 +96,16 @@ eos
|
||||
path = File.join(dir, file)
|
||||
validate_file(path, context.registers[:site].safe)
|
||||
|
||||
partial = Liquid::Template.parse(source(path, context))
|
||||
begin
|
||||
partial = Liquid::Template.parse(source(path, context))
|
||||
|
||||
context.stack do
|
||||
context['include'] = parse_params(context) if @params
|
||||
partial.render!(context)
|
||||
context.stack do
|
||||
context['include'] = parse_params(context) if @params
|
||||
partial.render!(context)
|
||||
end
|
||||
rescue => e
|
||||
raise IncludeTagError.new e.message, File.join(INCLUDES_DIR, @file)
|
||||
end
|
||||
rescue => e
|
||||
raise IncludeTagError.new e.message, File.join(INCLUDES_DIR, @file)
|
||||
end
|
||||
|
||||
def validate_dir(dir, safe)
|
||||
|
||||
Reference in New Issue
Block a user