Skip to content
BENIBIX Learn

YAML Ain't Markup Language (YAML)

Development📄 Files & FormatsConfig Files

Also known as YAML, YML, .yml file

A text format that is easy to read. It uses indents and is common for settings.

Think of it like

Think of it like a list with smaller lists in it. Indents show what goes under what.

Example

Jack writes a YAML file that tells his test server to run three steps. Each step is one line starting with a dash.

Why it matters

Most modern build and deploy tools are set up in YAML. Reading it is a daily skill.

Definition

YAML is a text format built to be easy for people to read and write. It uses indents instead of brackets, and a dash starts each list item. It is the usual format for config files in tools like Docker Compose, Kubernetes and GitHub Actions. It also allows comments, which JSON does not. The spaces matter, so a wrong indent changes the meaning.

Example code

yaml
name: Emma
skills:
  - Python
  - Git
The indent and the dashes make skills a list of two.

Common mistake

Using tabs to indent. YAML only accepts spaces, and a tab makes the file fail to load.

Key takeaways

  1. 1
    Indents, not brackets. Spacing shows the shape.
  2. 2
    Made for people. Easy to read and edit.
  3. 3
    Spaces only. Tabs are not allowed.

Compare

Learn it properly