The important bits are that the outer <div> tag has the class gallery, and none of the <img> tags are nested (ie. wrapped in another <div, or something).
Simple lightbox
That's it! Try clicking the images and a full-size version should appear on screen.
Feel free to fiddle with the CSS transitions as you please; they're just what I set up for testing.
Multiple-Image Galleries
Sometimes your gallery will have more than one image, and closing and re-opening the dialog to view each one just isn't efficient. Luckily, there's a way around that:
Simply give each image a data-gallery-index parameter and label the sequence!
Be careful: the counting starts from 0 rather than 1. Also make sure you don't skip numbers or anything, it doesn't like that.
Multi-image gallery
Alternate image URLs
If you're loading a particularly large gallery, it may not be practical to load full-size versions of each image. The downside to this is that, when enlarged in a lightbox, these images will continue to be low resolution.
Luckily, you can specify an alternate URL for the enlarged image using the data-large-src attribute:
If you encounter any problems or bugs, leave a post here.