Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Gallery display

The gallery display is an image-forward card grid.

Each card leads with the item’s thumbnail, then the title, a pill row of tags (or other tag fields), and a short description. When an item has a url, the whole card is clickable.

A .yml file is the quickest way to hand-curate a gallery. Give each entry a thumbnail to lead with and a url to link to:

The same display works over your own pages. Any post with a thumbnail in its frontmatter becomes a card, and the card links back to the page:

Items without a thumbnail still render, just without the image. Descriptions are truncated to keep the grid even; use the summary display when the full text matters.

Set the number of columns

By default the grid is responsive (1 column on phones up to 4 on wide screens). Pin it to a fixed count with :grid-columns::

Color-code several tag fields

By default the pill row shows each item’s tags. List several fields with :tag-fields: to show more than one kind of tag, each in its own color:

Colors come from a small fixed palette, assigned by list order, so keep the order consistent across pages. The same option works in the summary display.

Filter it live

The gallery uses MyST’s built-in card, whose renderer drops custom classes — so point searchfilter at .myst-listing-gallery .myst-card instead of .myst-listing-item: