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

jekyll-picture-tag: remove baseurl functionality for now

This commit is contained in:
Matthias Kretschmann 2014-09-02 21:01:06 +02:00
parent 77f08b98b7
commit 73377a05ac

View File

@ -142,7 +142,8 @@ module Jekyll
# Generate resized images
instance.each { |key, source|
instance[key][:generated_src] = generate_image(source, site.source, site.dest, settings['source'], settings['output'], site.config["baseurl"])
instance[key][:generated_src] = generate_image(source, site.source, site.dest, settings['source'], settings['output'])
#instance[key][:generated_src] = generate_image(source, site.source, site.dest, settings['source'], settings['output'], site.config["baseurl"])
}
# Construct and return tag
@ -169,7 +170,8 @@ module Jekyll
picture_tag
end
def generate_image(instance, site_source, site_dest, image_source, image_dest, baseurl)
def generate_image(instance, site_source, site_dest, image_source, image_dest)
#def generate_image(instance, site_source, site_dest, image_source, image_dest, baseurl)
image = MiniMagick::Image.open(File.join(site_source, image_source, instance[:src]))
digest = Digest::MD5.hexdigest(image.to_blob).slice!(0..5)
@ -230,7 +232,8 @@ module Jekyll
end
# Return path relative to the site root for html
Pathname.new(File.join(baseurl, image_dest, image_dir, gen_name)).cleanpath
Pathname.new(File.join('/', image_dest, image_dir, gen_name)).cleanpath
#Pathname.new(File.join(baseurl, image_dest, image_dir, gen_name)).cleanpath
end
end
end