You can iterate over data in a data file or in the current page’s frontmatter or any global variables from Jekyll or a plugin.

source

List of key-value pairs

_data/items.yaml

- foo: A
  bar: 10
  baz: 1000
- foo: B
  bar: 20
  baz: 999

index.md

---
---

Key-value pairs

_data/items.yaml

Foo: A
Bar: B

index.md


If the value is also a hash then you can do an inner loop which looks similar.

Another example

index.md