A {listing} renders its collected items with one of six built-in displays, chosen with the :display: option.
Each leads with something different:
Display | Best for | Leads with |
|---|---|---|
dense, scannable lists | the columns you pick | |
compact link lists, section landing pages | the first column you pick, then the rest on one line | |
visual collections | a thumbnail image | |
blog indexes, reading lists (scan and click through) | the description | |
blogs, bios (read in place) | the full body | |
whole pages built from a listing, like release notes or combined meeting notes | an |
Sorting, filtering, and limiting work the same in every display and are covered in Transform.
Options for every display¶
Each display page covers its own options. These work across displays.
Color-code several tag fields¶
By default the tag 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.
In an item, each of these fields can hold a list or a comma-separated string:
:::{listing}
:source: yaml
:path: ../links.yml
:display: gallery
:tag-fields: libraries, domains
:::Colors come from a small fixed palette, assigned by list order, so keep the order consistent across pages.
It works in every display that shows tags: gallery, summary, feed, and sections.
Filter it live¶
Add the searchfilter plugin to your myst.yml to give readers a search box that filters a listing as they type:
project:
plugins:
- https://raw.githubusercontent.com/jupyter-book/myst-plugins/main/plugins/searchfilter/searchfilter.mjsThen put a {searchfilter} directive on the page, with the item selector for your display as its argument.
Each display page has a demo.
| Display | Selector |
|---|---|
gallery | .myst-listing-gallery .myst-card |
| every other display | .myst-listing-item |
Labels and embeds¶
A :label: makes a listing a reference target.
Link to it, or embed it on any page in your project with .
The embed shows the same items as the original.
Its :path: resolves from the page that holds the {listing}, not the page that embeds it:
:::{listing}
:label: recent-posts
:path: ../posts/*.md
:columns: title,date
:::
| Title | Date |
|---|---|
| Community roundup | June 5, 2025 |
| Your first listing | May 15, 2025 |
| Interactive widgets | April 10, 2025 |
| Zebra release notes | March 1, 2025 |
| A February update | February 1, 2025 |
| Hello world | January 1, 2025 |
| The first prototype | November 20, 2024 |
| Title | Date |
|---|---|
| Community roundup | June 5, 2025 |
| Your first listing | May 15, 2025 |
| Interactive widgets | April 10, 2025 |
| Zebra release notes | March 1, 2025 |
| A February update | February 1, 2025 |
| Hello world | January 1, 2025 |
| The first prototype | November 20, 2024 |
Unknown displays¶
An unknown :display: warns and falls back to a table:
:::{listing}
:path: ../posts/*.md
:display: nope
:::| Title | Date |
|---|---|
| Community roundup | June 5, 2025 |
| Your first listing | May 15, 2025 |
| Interactive widgets | April 10, 2025 |
| Zebra release notes | March 1, 2025 |
| A February update | February 1, 2025 |
| Hello world | January 1, 2025 |
| The first prototype | November 20, 2024 |