Skip to content

Gallery

:::gallery lays out a set of images in a responsive masonry-style grid. Each line inside the block is one image.

:::gallery
![](/assets/animations/new folder.gif)
![](/assets/animations/editing.gif)
![](/assets/animations/first time publish.gif)
:::

Column count

Pass a number after gallery to set the column count.

:::gallery 3
![](/assets/animations/new folder.gif)
![](/assets/animations/editing.gif)
![](/assets/animations/first time publish.gif)
:::

The same count is also settable by name — :::gallery {per-line=3} — for when it needs to sit alongside other attributes on the same line. "Per line" is how many images fit along one line, and a line runs the way your text runs, so on a vertical page the images stack downward instead of across. The older cols= spelling still works but is deprecated.

moss