Data files 🔗

In this tutorial, you will add a YAML data file to the site from the Quickstart and render its values as a list.

Add the data 🔗

Create an _data folder in the site root. Inside it, create _data/authors.yaml:

- name: Ada
  skills: [mathematics, writing]
- name: Grace
  skills: [compilers, leadership]

Flatmark exposes a data file using its base name, so this file becomes site.data.authors.

Render the authors 🔗

Create content/authors.md:

---
title: Authors
---

# Authors


{% for author in site.data.authors %}
- **{{ author.name }}** — {{ author.skills|join(', ') }}
{% endfor %}

Start the development server:

flatmark serve

Open http://localhost:5555/authors.html. You will see both authors and their comma-separated skills.

Change a value in _data/authors.yaml and save it. The rebuilt page will show the new value.

The completed structure matches the data-file example.