13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/distorted-jekyll/molecule/svg.rb', line 13
def render_to_output_buffer(context, output)
super
begin
filez = files.map{ |f|
f.transform_values(&:to_s).transform_keys(&:to_s)
}
output << parse_template.render({
'name' => @name,
'path' => @relative_dest,
'alt' => abstract(:alt),
'title' => abstract(:title),
'href' => abstract(:href),
'caption' => abstract(:caption),
'loading' => abstract(:loading),
'sources' => filez,
'fallback_img' => @name,
})
rescue Liquid::SyntaxError => l
unless Jekyll.env == 'production'.freeze
output << parse_template(name: 'error_code'.freeze).render({
'message' => l.message,
})
end
end
output
end
|