mattvh / JekyllGalleryTag

Jekyll plugin to generate thumbnails from a directory of images and display them with a Liquid tag
74 stars 18 forks source link

Nested directories and keeping generated files. #1

Closed dmytro closed 11 years ago

dmytro commented 11 years ago

Two changes include in the pull request:

  1. Add \ in Dir.glob for allowing nested subdirectories in galleries. In the gallery tag need to specify sub-path of the images as in:
{% gallery new_gallery %}
new_gallery/IMG_1738.jpg:: Comment
new_gallery/IMG_1739.jpg:: Comment
{% endgallery %}
  1. Keep generated thumbnail files from overwriting.

When plugin is used to generate content in _site subdirectory, then all generated file *-thumb.jpg are deleted right after generation. Adding them to site.static_files prevent form cleaning.

mattvh commented 11 years ago
_plugins/galleries.rb:128:in `block in files_to_resize': uninitialized constant Jekyll::SitemapFile (NameError)

You seem to be calling a method from another plugin, or some other dependency.

dmytro commented 11 years ago

Interesting. Could be Jekyll version related. I'm on 1.1.2, let me check.

mattvh commented 11 years ago

It looks like I'm still on 1.0.3. I'll update it tomorrow and try again. It's most likely the problem.

mattvh commented 11 years ago

Hmmm. It's still doing it on 1.1.2...

mattvh commented 11 years ago

I can't seem to find any references to "SitemapFile" in mojombo/jekyll, either, and Google is only returning results for a plugin called "Jekyll Sitemap Generator."

dmytro commented 11 years ago

Oh... Apologies. I see the problem. I've copy pasted row from Sitemap Generator. It should be Jekyll::StaticFile, not SitemapFile.

Let me fix it.

dmytro commented 11 years ago

@redwallhp Please take a look now. I've added missing class, same way as it's done in SitemapGenerator. It looks a bit odd, but works.

itguy614 commented 10 years ago

I am new to Jekyll and Ruby and have been doing some experimenting. I seem to be running into the issue where the generated thumbs are being deleted after they are generated.