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.
Diagrams open at a readable shape-aware scale. Zoom or expand when you need more detail.
Decision matrix
| Need | Data file | Page | Post | Collection |
|---|---|---|---|---|
| structured records | strong | possible | possible | strong |
| long Markdown body | awkward | strong | strong | strong |
| date-oriented stream | weak | weak | strongest | possible |
| individual URL | template-dependent | yes | yes | optional/configurable |
| custom content type | weak | one-off | fixed post semantics | strongest |
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: