Solitude Docs

Gallery (Third Party)

Embed masonry galleries with the third-party hexo-gallery tag plugin.

Solitude 4 has no built-in gallery page type. This guide uses a third-party block tag inside a normal Hexo post or page.

npm install hexo-gallery
pnpm add hexo-gallery
yarn add hexo-gallery

Create a normal page and use the plugin tag in its Markdown body:

---
title: Gallery
date: 2026-01-01
comment: false
aside: false
---

{% gallery "title:City Walk" "author:Your Name" "col:3" "show:6" %}
/img/gallery/01.jpg
/img/gallery/02.jpg
/img/gallery/03.jpg
{% endgallery %}

The plugin also accepts site, date, platform, background, titlecolor, and desccolor options. See the plugin repository and test its CSS, lazy loading, and PJAX behavior separately from the theme.