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:
parent
a6f9989fa3
commit
c712bb1ec5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user