Anatomy of a lesson
The front matter fields that drive the lesson header and the home page.
By the end of this lesson you will
- Write a lesson’s front matter
- Choose a lesson kind and time estimate
- Write learning objectives that show up in the header
Cheat sheet
minutes: 7- Time chip; turns the header on
kind: code- read, code, quiz or lab
objectives:- List shown in the header box
cheatsheet:- Right-rail quick reference
rail-links:- Right-rail links
Resources
Look at the top of this page: the coloured chips (Reading, 7 min) and the box with objectives. None of that is written in the page body. It is all drawn from the front matter.
The front matter
---
title: "Anatomy of a lesson"
description: "One sentence. Shown on the home page and in search."
minutes: 7
kind: read # read | code | quiz | lab
objectives:
- "Write a lesson's front matter"
- "Choose a lesson kind and time estimate"
---| Field | Used for |
|---|---|
title |
Page title, sidebar entry, home page row |
description |
Subtitle and the grey line under the row on the home page |
minutes |
The time chip, the module total and the course total |
kind |
The icon and colour: read, code, quiz or lab |
objectives |
The “By the end of this lesson you will” box |
Important
minutes switches the header on
The header is only drawn on pages that define minutes. Module overview pages omit it on purpose.
A good lesson shape
- Objectives (from front matter).
- A short opening that says why this matters.
- One idea per
##heading. Each heading becomes an entry in the right-hand outline. - A Check your understanding section with one to three questions.
- A
.takeawaysblock with two to four bullets.
Discuss first
If you could only keep three bullets of this lesson, which would they be? Hold that thought: it is exactly what goes in the takeaways box.
Check your understanding
Q1. Which front matter field turns the lesson header on?
- Front matter drives the header, time estimates and the home page.
kindis one of read, code, quiz or lab.- Keep one idea per heading and end with a quiz and takeaways.