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

  1. Define Data: Add a list of images (src, thumb, caption) to the Front Matter.
  2. Use Shortcode: pass the variable name to the shortcode {% gallery post_images %}.
  3. Result: A responsive masonry grid that uses your existing lightbox.js and CSS variables.