1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-02-14 21:10:25 +01:00

insert cdnurl during picture tag creation depending on production config value

This commit is contained in:
Matthias Kretschmann 2014-09-06 00:42:39 +02:00
parent a6f9989fa3
commit c712bb1ec5

View File

@ -230,7 +230,11 @@ module Jekyll
end
# Return path relative to the site root for html
Pathname.new(File.join(cdnurl, baseurl, image_dest, image_dir, gen_name)).cleanpath
if context.registers[:site].config['production']
Pathname.new(File.join(cdnurl, baseurl, image_dest, image_dir, gen_name)).cleanpath
else
Pathname.new(File.join(baseurl, image_dest, image_dir, gen_name)).cleanpath
end
end
end
end