Unit 02 · lesson

Debug Broken YAML and Liquid

Now combine the two failure families you have been learning.

The goal is not to make a mess.

The goal is to recognize what kind of mess you made.

Failure family 1: YAML cannot parse

Create a disposable front-matter error such as bad indentation or malformed structure.

Build.

Record:

Did the build stop?
What file/line evidence was reported?
Did Liquid run afterward?

A YAML parser failure can stop processing before your template logic matters.

Failure family 2: Liquid syntax error

In a disposable copy, break a tag:

{% if page.featured %}
  Featured

without the expected closing structure.

Build and read the error.

Again, locate the file and the stage.

Failure family 3: valid syntax, wrong value

This is more dangerous because the build can succeed.

Example:

{{ page.descripton }}

when the key is actually:

description: ...

The output may simply be blank.

No dramatic parser error.

Your evidence must include the data model.

Failure family 4: wrong scope

{{ site.description }}

when the value belongs to page.description.

Valid Liquid.

Wrong assumption.

Build a diagnosis matrix

SymptomFirst boundary to inspect
build stops with YAML parser errorfront matter/config YAML
build stops with Liquid syntax errortemplate/tag syntax
build succeeds but value is blankkey/scope/data
generated HTML correct, browser appearance wrongpresentation/browser layer

Add one row from your own experiment.

Repair discipline

For every failure:

  1. record the failing evidence;
  2. make one repair;
  3. rebuild;
  4. verify the expected output;
  5. keep the before/after evidence.

Checkpoint

Write a bounded diagnosis using:

The build reached __________ but failed at __________. I know because __________.