There are actually two different types of galleries shown here, featured in two different blog posts:
Automatically generated index page with multiple sub-galleries
For more information and step-by-step instructions, read this blog post:
Generating an image gallery with Jekyll and Lightbox2
Text pages with inline galleries (version 1/version 2)
For more information and step-by-step instructions, read this blog post:
Jekyll / Lightbox2 image gallery, another approach
This demo makes use of the following open source projects: