Sample Gallery
Gallery Shortcode Demo
This post demonstrates how to embed a Masonry Gallery directly inside a markdown file using the custom Shortcode.
The images are defined in the YAML Front Matter of this file (see post_images), which gives you full control over captions and order per post.
How it works
- Define Data: Add a list of images (src, thumb, caption) to the Front Matter.
- Use Shortcode: pass the variable name to the shortcode
{% gallery post_images %}. - Result: A responsive masonry grid that uses your existing
lightbox.jsand CSS variables.