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.

Tutorial

This tutorial builds three listings, one for each kind of source: Markdown pages, a data file, and data written inside the directive. Each one uses a different display. It assumes you’ve added the plugin to your myst.yml (see Get started).

List your pages

This site has a posts/ folder of short Markdown pages. Here’s one of them:

2025-01-01-hello.md
---
date: 2025-01-01
author: Ada Lovelace
tags: [intro, news]
description: The very first post — what this project is, why we started it, and where we hope to take it over the coming year.
thumbnail: https://picsum.photos/seed/hello/400/300
---

# Hello world

First post body.

Point :path: at the folder, and each page becomes one item. Its frontmatter fills in the item’s fields, and its # Hello world heading becomes the title:

:::{listing}
:path: posts/*.md
:columns: title,date,tags
:::

TitleDateTags
Community roundupJune 5, 2025news, community
Your first listingMay 15, 2025tutorial, docs
Interactive widgetsApril 10, 2025release, news
Zebra release notesMarch 1, 2025release
A February updateFebruary 1, 2025news
Hello worldJanuary 1, 2025intro, news
The first prototypeNovember 20, 2024release

Change :columns: to list “description”, and it’ll show up in the listing:

:::{listing}
:path: posts/*.md
:columns: title,description
:::

TitleDescription
Community roundupHighlights from the community call — new contributors, three plugins in the works, and a roadmap for the next release cycle.
Your first listingA step-by-step guide to your first listing, from a bare directive to a styled gallery.
Interactive widgetsInteractive widgets have landed. Embed live, manipulable figures directly in your pages — sliders, toggles, and plots that respond to readers — without writing a single line of JavaScript yourself.
Zebra release notesThe Zebra release is out — faster builds, a redesigned gallery, and a long list of bug fixes contributed by the community.
A February updateWhat happened in February — a roundup of fixes, docs improvements, and the first community contributions to land.
Hello worldThe very first post — what this project is, why we started it, and where we hope to take it over the coming year.
The first prototypeA look back at the very first prototype — what worked, what didn't, and the rough edges we sanded down before the public launch.

The same items can be shown another way. The summary display leads with each item’s description and thumbnail, and :limit: 3 keeps only the three newest:

:::{listing}
:path: posts/*.md
:display: summary
:limit: 3
:::

June 5, 2025 · Ada Lovelace, Grace Hopper
Highlights from the community call — new contributors, three plugins in the works, and a roadmap for the next release cycle.
newscommunity
May 15, 2025
A step-by-step guide to your first listing, from a bare directive to a styled gallery.
tutorialdocs
April 10, 2025
Interactive widgets have landed. Embed live, manipulable figures directly in your pages — sliders, toggles, and plots that respond to readers — without writing a single line of JavaScript yourself.
releasenews

To learn more:

List rows from a data file

Not every item is a page. For a list of links to other projects, a data file is easier to keep up to date. Here’s links.csv, which you could export from a spreadsheet:

links.csv
title,url,description,date,tags
MyST Markdown,https://mystmd.org,The MyST document engine,2024-06-01,docs; tools
Jupyter Book,https://jupyterbook.org,"Build books and documents from computational material, like notebooks",2025-01-15,docs

Set :source: csv and point :path: at the file. Each row becomes an item, and the list display shows them as bullets:

:::{listing}
:source: csv
:path: links.csv
:display: list
:columns: title,description
:::

YAML, JSON, and TOML files work the same way (see Collectors).

Write the data in the directive

For a short, one-off listing, skip the file and write the items as YAML in the directive body. Give each a thumbnail and show them as a gallery of cards:

:::{listing}
:source: yaml
:display: gallery

- title: MyST Markdown
  url: https://mystmd.org
  description: Turns Markdown and notebooks into books, articles, and websites.
  thumbnail: https://avatars.githubusercontent.com/u/115208022?v=4
- title: Jupyter Book
  url: https://jupyterbook.org
  description: Builds books and documents from computational material.
  thumbnail: https://avatars.githubusercontent.com/u/46299776?v=4
- title: Project Jupyter
  url: https://jupyter.org
  description: The project behind notebooks and JupyterLab.
  thumbnail: https://avatars.githubusercontent.com/u/7388996?v=4
:::

Next steps