Picture gallery on Jekyll static site

Written by
Date: 2013-01-02 15:29:00 00:00


I do not like to have my content on someone's else application, I mean I do not like my content hosted on Facebook, Tumblr, 500px or anybody else. I like my content with me, I like to have full control over it.

That is why I have my own site, under my name, where I publish my online content. This site is now statically generated by Jekyll, and suddenly I wanted to be able to host picture galleries on this site.

I searched on Google a little, and found a good plugin to create photo galleries for Jekyll sites. I also wanted to have some of those nice effects you find on Wordpress sites. And for that I have found also a nice solution. It was just now as simple as put them together. Here is how.

Installing the plugin for photo gallery on Jekyll

Thanks God, somebody already made the plugin, thank you Geoff.

You can download the plugin here and follow the instructions there if you are on a Mac. If you are working on Ubuntu you need to do something similar.

sudo apt-get install libmagickwand-dev imagemagick
sudo gem install rmagick
sudo gem install exifr

Then:

cp gallery_generator.rb jekyll-site/_plugins/
cp gallery_index.html jekyll-site/_layouts/
cp gallery_page.html jekyll-site/_layouts/

Install Lightbox2

Download the Lightbox2 and follow the instructions in their site. You will have to load the .js and .css files on your default.html layout, or in your gallery_page.html and gallery_index.html layouts, that way you avoid loading them on pages that do not need them.

After that you should be ready to go.

You can browse my gallery