Unit 02 · lesson

YAML Without the Mystery

Front matter is written in YAML.

So before you use front matter everywhere, learn enough YAML to stop treating indentation as decoration.

A small YAML object

title: About Me
featured: true
skills:
  - Python
  - Robotics
  - Linux
project:
  name: Robot Demo
  year: 2026

This represents structured values:

  • strings;
  • a boolean;
  • a list;
  • a nested mapping.

Whitespace can carry structure

In YAML, indentation matters.

Compare:

project:
  name: Robot Demo
  year: 2026

with a malformed indentation pattern.

A configuration or front-matter error may cause Jekyll to stop with a YAML parsing error before Liquid or HTML rendering ever occurs.

Strings are not always obvious

A value that looks numeric, boolean-like, date-like, or contains punctuation can be interpreted differently than you expect.

When ambiguity matters, quote the value deliberately:

room: "101"
status: "on"

Do not quote everything blindly either. Learn what type you intend.

Guided data model

Create this source:

title: Projects
show_featured: true
tags:
  - robotics
  - web
  - python

Label each value's intended type.

Then deliberately change one indentation level and observe the parser/build behavior in a disposable copy.

Failure boundary

A YAML parse failure means Jekyll may never reach the part of the build where your template logic runs.

So if the terminal says YAML is invalid, rewriting CSS is nonsense.

Read the first relevant build error.

Find the file and line if Jekyll provides them.

Repair the smallest thing.

Build again.

Portfolio action

Draft the metadata you want your About page to carry:

title:
description:
featured:
skills:

Only add fields you have a reason to use.

Checkpoint

Explain:

Why can two YAML files contain the same words but represent different structures because of indentation?

Then save one valid and one intentionally broken YAML specimen with the error evidence that distinguished them.