👩💻 Join our community of thousands of amazing developers!
When I figured out how to create an image gallery with Hugo and Lightbox2, there’s one thing I left out: image captions. In Lightbox2 itself, this is straightforward. Here’s the generated HTML from the current version of my Hugo/Lightbox2 gallery, for one single image (image URLs shortened for brevity): <a href="path/to/image.jpg" data-lightbox="x"><img src="path/to/thumbnail.jpg" /></a> To add a caption, you just add a data-title attribute: <a href="path/to/image.jpg" data-lightbox="x" data-ti...