Unit 04 · lesson

Data Files vs Pages vs Posts vs Collections

You now have enough Jekyll features to make bad architecture decisions with confidence.

So stop and compare them.

Jekyll content models feeding Liquid and rendered pages.
Jekyll content models feeding Liquid and rendered pages.

Diagrams open at a readable shape-aware scale. Zoom or expand when you need more detail.

Decision matrix

NeedData filePagePostCollection
structured recordsstrongpossiblepossiblestrong
long Markdown bodyawkwardstrongstrongstrong
date-oriented streamweakweakstrongestpossible
individual URLtemplate-dependentyesyesoptional/configurable
custom content typeweakone-offfixed post semanticsstrongest

This is a reasoning aid, not a law.

Portfolio decisions

Classify:

  • navigation;
  • About;
  • technical journal;
  • project case studies;
  • social links;
  • skill list.

Migration evidence

Compare your earlier _data/projects.yml implementation with the collection version.

Ask:

  • Which source is easier to write?
  • Which supports long-form case-study content better?
  • Which creates public project pages more naturally?
  • Which requires more configuration?

Do not optimize for feature count

A site using all Jekyll features is not automatically better than a smaller site.

Use the model that best represents the content and required behavior.

Checkpoint

Write one Architecture Decision Record:

Decision: Store portfolio projects as a collection.
Context:
Alternatives considered:
Why this model fits:
Tradeoff accepted: