Table display
The table display renders items as rows, one column per field you name in :columns:.
It is the default, so a bare {listing} is already a table.
This page covers the table-specific options; sorting, filtering, and limiting are the same in every display and are covered in Transform.
Pick your columns¶
:columns: is a comma-separated list of field names. title links to the item when it has a url.
:::{listing}
:path: ../posts/*.md
:columns: title,date,tags
:::| Title | Date | Tags |
|---|---|---|
| Community roundup | June 5, 2025 | news, community |
| Your first listing | May 15, 2025 | tutorial, docs |
| Interactive widgets | April 10, 2025 | release, news |
| Zebra release notes | March 1, 2025 | release |
| A February update | February 1, 2025 | news |
| Hello world | January 1, 2025 | intro, news |
| The first prototype | November 20, 2024 | release |
From an external YAML file¶
Set :source: yaml and point :path: at a .yml whose top-level entries use the item fields:
:::{listing}
:source: yaml
:path: ../links.yml
:columns: title,description,date
:::| Title | Description | Date |
|---|---|---|
| Jupyter Book | Build publication-quality books and documents from computational material, combining prose, code, and live outputs in a single project. | January 15, 2025 |
| Project Jupyter | The open-source project behind notebooks, JupyterLab, and the broader interactive computing ecosystem used across science and education. | September 10, 2024 |
| MyST Markdown | The MyST document engine — a fast, extensible toolchain for technical writing that turns Markdown and notebooks into books, articles, and websites. | June 1, 2024 |
| Executable Books | The community that grew the original Jupyter Book and MyST, dedicated to open tools for reproducible, computational narratives. | March 22, 2024 |
| Wide thumbnail (3:1) | A landscape image, cropped at top and bottom to fit the 3:2 cover. | |
| Tall thumbnail (1:2) | A portrait image, cropped at the sides to fit the 3:2 cover. | |
| Square thumbnail (1:1) | A square image, lightly cropped to fit the 3:2 cover. |
From inline YAML¶
For a quick one-off listing, skip the file and write the YAML list straight in the directive body:
:::{listing}
:source: yaml
:columns: title,description
- title: Inline One
description: Written in the directive body
- title: Inline Two
description: No file needed
:::| Title | Description |
|---|---|
| Inline One | Written in the directive body |
| Inline Two | No file needed |
From JSON¶
:source: json reads a .json file (or inline body) holding one top-level array.
The file below came from gh issue list --limit 5 --json title,url,updatedAt, so the table shows this repo’s own open issues:
:::{listing}
:source: json
:path: ../issues.json
:columns: title,updatedAt
:sort: updatedAt-desc
:::| Title | UpdatedAt |
|---|---|
| Add a JSON collector | August 11, 2026 |
| Allow users to dynamically sort tables | July 28, 2026 |
| Add column or entry option for something like "completion amount" | July 24, 2026 |
| Allow for hierarchical or nested listings like a list-mode | July 11, 2026 |
| Consider an array for the `sort` option? | July 3, 2026 |
From TOML¶
:source: toml works the same way, from a .toml file or inline.
TOML has no top-level list, so wrap the items in an array-of-tables:
:::{listing}
:source: toml
:path: ../links.toml
:columns: title,description,date
:::| Title | Description | Date |
|---|---|---|
| Jupyter Book | Publication-quality books from computational material. | January 15, 2025 |
| MyST Markdown | The MyST document engine for technical writing. | June 1, 2024 |
Or write the TOML inline:
:::{listing}
:source: toml
:columns: title,description
[[items]]
title = "Toml One"
description = "Written in the directive body"
[[items]]
title = "Toml Two"
description = "No file needed"
:::| Title | Description |
|---|---|
| Toml One | Written in the directive body |
| Toml Two | No file needed |
Filter it live¶
Each data row carries a myst-listing-item class (the header doesn’t, so it stays put), which the searchfilter plugin can target to filter rows as you type:
:::{searchfilter} .myst-listing-item
:::
:::{listing}
:path: ../posts/*.md
:columns: title,date,tags
:::| Title | Date | Tags |
|---|---|---|
| Community roundup | June 5, 2025 | news, community |
| Your first listing | May 15, 2025 | tutorial, docs |
| Interactive widgets | April 10, 2025 | release, news |
| Zebra release notes | March 1, 2025 | release |
| A February update | February 1, 2025 | news |
| Hello world | January 1, 2025 | intro, news |
| The first prototype | November 20, 2024 | release |
Interactive sorting¶
Add the :sortable: flag and readers can re-sort the table by clicking a column header.
Re-sorting happens in the browser and only rearranges the rows shown, so :limit: still applies.
There’s some basic logic to try to sort sensibly: dates are sorted by date, not alpha-numerically, and the first click on a numeric or date column sorts largest/newest first (text sorts A–Z).
:::{listing}
:path: ../posts/*.md
:columns: title,date,tags
:sortable:
:::| Title | Date | Tags |
|---|---|---|
| Community roundup | June 5, 2025 | news, community |
| Your first listing | May 15, 2025 | tutorial, docs |
| Interactive widgets | April 10, 2025 | release, news |
| Zebra release notes | March 1, 2025 | release |
| A February update | February 1, 2025 | news |
| Hello world | January 1, 2025 | intro, news |
| The first prototype | November 20, 2024 | release |