follmann / middleman-favicon-maker

Generate favicon files in various sizes from a base image in your middleman project
MIT License
114 stars 15 forks source link

Middleman v4 support #34

Closed alem0lars closed 9 years ago

mrtnpro commented 9 years ago

+1

follmann commented 9 years ago

Recently I don't have a lot of time to spend on this project. A pull request would be much appreciated. Thanks!

mrtnpro commented 9 years ago

I'm using your fork @LMolr, thanks for addressing the v4 issue. However I'm getting another error which I don't know if it is from the extension itself or ImageMagick. Any idea?

convert: unable to open image `/Users/martin/Development/Projects/wardanetwork-v2/build/assets/images/favicons/favicon-152x152.png': No such file or directory @ error/blob.c/OpenBlob/2709.
convert: WriteBlob Failed `/Users/martin/Development/Projects/wardanetwork-v2/build/assets/images/favicons/favicon-152x152.png' @ error/png.c/MagickPNGErrorHandler/1805.
      create  build/assets/images/favicons/favicon-152x152.png
mrtnpro commented 9 years ago

@LMolr can you please do a pull request? Much love!

LMolr commented 9 years ago

@crtvhd Aye, done in #35 :)

follmann commented 9 years ago

After taming some relative path issues, I have just released middleman-favicon-maker (4.0.0.beta.1). Thanks!

mrtnpro commented 9 years ago

Works fine! Thanks guys.

However stumbles across the error I mentioned above: My config looked like this:

  activate :favicon_maker do |f|
    f.template_dir  = File.join(root, 'source/images/favicons')
    f.output_dir    = File.join(root, 'build/images/favicons')
    […]

Because my asset source folder source/images/favicons contained only files that are being ignored by the asset pipeline (prefixed with _filename.png), middleman didn't create the destination folder build/images/favicons during build. That's the reason why middleman-favicon-maker failed during build. However as soon as I created the destination folder manually, everything worked fine. Keep in mind that your destination folder (f.output_dir) has to exist before this gem is able to do it's magic.