You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minimagick.rb: this plugin will automatically generate thumbnails and resize any image file (png,jpg,jpeg,gif) contained in any sub folder added to this location /source/images/galleries.
gallery_tag.rb: this plugin will create an image list from each gallery folder present in /source/images/galleries. You can easily change the path reflecting your own working directory structure by setting your own BASE_DIR in gallery_tag.rb.
Install:
copy both plugins or clone this repo in your octopress_project/plugins folder.
MiniMagick Plugin (mini_magick.rb):
Add mini_magick to your Gemfile
#Gemfile
gem 'mini_magick'
create a new “galleries” folder in your octopress_project/source/images dir (you can choose to edit this accordingly to the value of BASE_DIR in gallery_tag.rb).
add some folders with images (those can be any png,jpg,jpeg,gif) to your newly created “source/images/galleries” dir:
this will automatically loop through each gallery folder and manipulate images based on the commands defined in your _config.yml file (adjust and edit settings accordingly to your own needs).
create a new post (or page) in source/posts and add the image_list liquid filter (don’t forget to pass it the name of the gallery folder: e.g. in this post I am creating the image_list for the gallery_1 folder in images/galleries so i am passing the name of the corresponding folder ’gallery1’)
#source/_posts/gallery_post.textile
---
layout: post
title: gallery post
categories: my category
---
{{ 'gallery_1' | image_list }}
edit or modify the generated code in gallery_tag.rb to make it work with lightbox, fancybox or any other additional piece of js you are using to enhance your generated image gallery list.