From 73377a05acf7c4cc5268f69b86f2bc62b35d030a Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 2 Sep 2014 21:01:06 +0200 Subject: [PATCH] jekyll-picture-tag: remove baseurl functionality for now --- _src/_plugins/picture_tag.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/_src/_plugins/picture_tag.rb b/_src/_plugins/picture_tag.rb index daf5bf05..5c93a774 100755 --- a/_src/_plugins/picture_tag.rb +++ b/_src/_plugins/picture_tag.rb @@ -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