Unit 06 · lesson

YAML Failures

YAML appears in front matter, configuration, and data files.

One syntax family can therefore break multiple Jekyll responsibilities.

Three YAML scopes

PAGE FRONT MATTER
_CONFIG.YML
_DATA/*.YML

A parser error in each affects a different responsibility even if the parser message looks similar.

Controlled failures

Create disposable examples of:

  • bad indentation;
  • unclosed quote;
  • malformed list/mapping structure.

Build after each one separately.

Record:

File type:
Build stopped? yes/no
Message:
Line/column evidence:
Downstream stage never reached:

Valid YAML can still be wrong

This parses:

ouput: true

But Jekyll expects:

output: true

Syntax valid.

Meaning wrong.

That is why parser success is not semantic correctness.

Diagnostic rule

First ask:

Can the YAML be parsed?

Then:

Does the parsed key/value mean what Jekyll/template logic expects?

Checkpoint

Compare one parser failure with one valid-but-wrong-key failure. Explain why they need different evidence.