robwierzbowski / jekyll-image-tag

Better images for Jekyll.
BSD 3-Clause "New" or "Revised" License
98 stars 26 forks source link

jekyll-image-tag / jekyll-picture-tag not working for me :( #19

Closed nevvkid closed 10 years ago

nevvkid commented 10 years ago

hi there. i tried getting the jekyll-picture-tag working for me - and it didn't. either on my own theme - or with a clean generator-jekyllrb html5bp install...

using jekyll-picture-tag the error i get with "jekyll build --trace" looks like this:

Configuration file: /Users/johannes/Documents/CODE/nevvkid/_config.yml Source: /Users/johannes/Documents/CODE/nevvkid Destination: /Users/johannes/Documents/CODE/nevvkid/_site Generating... Liquid Exception: Image Tag can't find the "[400x600]" preset. Check image: presets in _config.yml for a list of presets. in _posts/2014-06-16-post.md /Users/johannes/Documents/CODE/nevvkid/_plugins/image_tag.rb:88:in render': Image Tag can't find the "[400x600]" preset. Check image: presets in _config.yml for a list of presets. (RuntimeError) from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/block.rb:106:inblock in render_all' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/block.rb:93:in each' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/block.rb:93:inrender_all' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/block.rb:82:in render' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/template.rb:124:inrender' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/template.rb:132:in render!' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/convertible.rb:88:inrender_liquid' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/convertible.rb:150:in do_layout' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/post.rb:259:inrender' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/site.rb:239:in block in render' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/site.rb:238:ineach' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/site.rb:238:in render' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/site.rb:39:inprocess' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/command.rb:18:in process_site' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/commands/build.rb:23:inbuild' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/commands/build.rb:7:in process' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/bin/jekyll:77:inblock (2 levels) in <top (required)>' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/command.rb:180:in call' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/command.rb:180:incall' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/command.rb:155:in run' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/runner.rb:422:inrun_active_command' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/runner.rb:82:in run!' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/delegates.rb:8:inrun!' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>'

using the jekyll-picture-tag....

Configuration file: /Users/johannes/Documents/CODE/nevvkid/_config.yml Source: /Users/johannes/Documents/CODE/nevvkid Destination: /Users/johannes/Documents/CODE/nevvkid/_site Generating... Liquid Exception: no implicit conversion of nil into String in _posts/2014-06-16-post.md /Users/johannes/Documents/CODE/nevvkid/_plugins/picture_tag.rb:233:in join': no implicit conversion of nil into String (TypeError) from /Users/johannes/Documents/CODE/nevvkid/_plugins/picture_tag.rb:233:ingenerate_image' from /Users/johannes/Documents/CODE/nevvkid/_plugins/picture_tag.rb:145:in block in render' from /Users/johannes/Documents/CODE/nevvkid/_plugins/picture_tag.rb:144:ineach' from /Users/johannes/Documents/CODE/nevvkid/_plugins/picture_tag.rb:144:in render' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/block.rb:106:inblock in render_all' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/block.rb:93:in each' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/block.rb:93:inrender_all' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/block.rb:82:in render' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/template.rb:124:inrender' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/liquid-2.5.5/lib/liquid/template.rb:132:in render!' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/convertible.rb:88:inrender_liquid' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/convertible.rb:150:in do_layout' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/post.rb:259:inrender' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/site.rb:239:in block in render' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/site.rb:238:ineach' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/site.rb:238:in render' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/site.rb:39:inprocess' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/command.rb:18:in process_site' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/commands/build.rb:23:inbuild' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/lib/jekyll/commands/build.rb:7:in process' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/jekyll-1.5.1/bin/jekyll:77:inblock (2 levels) in <top (required)>' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/command.rb:180:in call' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/command.rb:180:incall' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/command.rb:155:in run' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/runner.rb:422:inrun_active_command' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/runner.rb:82:in run!' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/delegates.rb:8:inrun!' from /Users/johannes/.rvm/gems/ruby-2.0.0-p0/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>'

any thoughts how to fix this?

robwierzbowski commented 10 years ago

Both look like configuration issues. We've had problems with good error reporting from the start — try checking your configuration for typos and your picture/image tags to make sure the preset they're using exists. Let me know what you find.

nevvkid commented 10 years ago

Hi. So now it's working. Stupid little detail - in my _config.yml i did not define a baseurl and still i have not set a baseurl but added two quotation marks so it looks like > baseurl: "" One other problem i had was bundler getting jekyll 2.0 by default. so added the github-pages jekyll version to the gemfile and of course mini_magick.

here is a repo containing the jekyll default theme with all settings working. https://github.com/nevvkid/jekyll-picture-tag-demo

maybe you can add something like this in a "demo" branch of the plugin? (i will delete the repo - only to have it online for now....) or a hind about the baseurl...

thank you for the great work!

robwierzbowski commented 10 years ago

Thanks for the great follow up! Yeah, if you can leave that repo online for a while I'll take a look and see what parts of it I can add to the docs. High five.

On Saturday, June 21, 2014, Johannes Lohbihler notifications@github.com wrote:

Hi. So now it's working. Stupid little detail - in my _config.yml i did not define a baseurl and still i have not set a baseurl but added two quotation marks so it looks like > baseurl: "" One other problem i had was bundler getting jekyll 2.0 by default. so added the github-pages jekyll version to the gemfile and of course mini_magick.

here is a repo containing the jekyll default theme with all settings working. https://github.com/nevvkid/jekyll-picture-tag-demo

maybe you can add something like this in a "demo" branch of the plugin? (i will delete the repo - only to have it online for now....) or a hind about the baseurl...

  • And one question about the markdown parser as i prefer to use kramdown - what exactly is the reason to choose redcarpet > only the html5 markup?

thank you for the great work!

— Reply to this email directly or view it on GitHub https://github.com/robwierzbowski/jekyll-image-tag/issues/19#issuecomment-46757501 .

Rob Wierzbowski @robwierzbowski http://twitter.com/#!/robwierzbowski http://github.com/robwierzbowski http://robwierzbowski.com

nevvkid commented 10 years ago

Yeah i am still wondering what was the problem with Jekyll 2.x

I want to add your generator-jekyllrb to my toolchain also and read about the plans to use gulp instead of grunt. Are you kean about this project? https://github.com/sondr3/generator-jekyllized I don't know if it reflects your ideas and how the quality is - but maybe worth checking out.