Unit 06 · lesson

`_config.yml` Is Site-Wide State

_config.yml Is Site-Wide State

A page controls page-level data.

_config.yml controls assumptions that apply to the site/build.

That makes it powerful and dangerous.

Configuration belongs near the root of the model

Jekyll's official configuration documentation explains that build options can come from _config.yml/_config.toml or command-line flags.

A small portfolio configuration might include:

title: My Portfolio
description: Projects, notes, and technical learning.
url: "https://example.github.io"
baseurl: "/my-portfolio"

Other configuration later controls:

  • collections;
  • defaults;
  • plugins;
  • permalink policy;
  • excludes/includes;
  • Markdown/Liquid/Sass options;
  • destination/source behavior.

Site-wide means wide blast radius

If page.title is wrong on one page, one page may look wrong.

If site.baseurl is wrong inside shared link generation, every internal link may be affected.

Shared state changes the scope of failure.

Inspect current configuration

Create a table:

KeyWhy it existsWhich output depends on it

Do not keep keys you cannot explain.

Configuration changes may require restart

The official collection tutorial explicitly reminds learners to restart Jekyll after _config.yml changes so configuration is reloaded.

If you change config and see no effect, ask whether the running process loaded the new state.

Checkpoint

Choose one _config.yml key and trace:

config source → Jekyll site data/build behavior → generated output