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
| Symptom | First boundary to inspect |
|---|---|
| build stops with YAML parser error | front matter/config YAML |
| build stops with Liquid syntax error | template/tag syntax |
| build succeeds but value is blank | key/scope/data |
| generated HTML correct, browser appearance wrong | presentation/browser layer |
Add one row from your own experiment.
Repair discipline
For every failure:
- record the failing evidence;
- make one repair;
- rebuild;
- verify the expected output;
- keep the before/after evidence.
Checkpoint
Write a bounded diagnosis using:
The build reached __________ but failed at __________. I know because __________.