Adding a subject or course
Register a new subject or course in the content manifests, and what appears in the app when you do.
Subjects and courses are plain JSON files in content/. Adding one needs no code changes: the build reads the manifests and the app shows a course as soon as it has its first note.
How the manifests fit together#
content/subjects.json -> subjects, in display order
courses: ["physics-as", ...] -> content/courses/physics-as.json
units[].notes: ["kinematics/equations-of-motion", ...]
-> content/notes/physics-as/kinematics/equations-of-motion.mdAdding a course#
-
Create
content/courses/<slug>.json:{ "slug": "further-pure-1", "subject": "maths", "title": "Further Pure Mathematics 1", "short": "FP1", "level": "AS", "paper": "FP1", "units": [ { "slug": "roots-of-polynomials", "title": "Roots of polynomial equations", "notes": ["roots-of-polynomials/symmetric-functions"] } ] } -
Add the slug to its subject's
courseslist incontent/subjects.json, in the order courses should appear. -
Write the notes under
content/notes/<slug>/, withcourse: <slug>in their frontmatter. -
Run
pnpm notes:check <slug>.
| Field | Meaning |
|---|---|
slug | Lowercase letters, digits and hyphens. Must match the file name and the notes folder. |
subject | The subject's slug |
title | Full course name, shown in the sidebar and on the home page |
short | Short label shown in search results, on the home page, in the planner and on cheat sheet items, such as P1 or AS |
level | AS or A2 |
paper | The paper label for the course |
units | Units in syllabus order, each with a slug, a title and its note ids |
Note ids in units[].notes are relative to the course folder. The sidebar lists units in manifest order, each with its notes. A unit with the slug overview is left out of the unit counts on the home page, so put it first.
Adding a subject#
Add an entry to content/subjects.json:
{
"slug": "further-maths",
"title": "Further Mathematics",
"short": "Further Maths",
"code": "9231",
"syllabus": "Cambridge International AS & A Level Further Mathematics (9231)",
"courses": ["further-pure-1"]
}| Field | Meaning |
|---|---|
slug | The subject's id, used by its courses' subject field |
title | Full name |
short | Short name for tight spaces |
code | The syllabus code |
syllabus | The syllabus's full title |
courses | Course slugs in display order |
Then add its courses as above.
When it appears#
The build only exposes courses that have at least one note, and subjects with at least one such course. So you can commit a complete manifest for a subject before its notes are written: it stays hidden in the workspace until the first note lands, and then the course appears in the sidebar, the planner and search together.
pnpm notes:check warns when a manifest references a note file that does not exist yet, which doubles as a to-do list while a course is being written.
Things to check by hand#
- Subject icon. Each subject has a lucide icon, set in
SUBJECT_ICONSinsrc/components/meta.tsx. A new subject shows a plain book icon until you add one. - AI prompts. The AI features are switched off for now (
AI_ENABLEDinsrc/config/ai.ts), but their prompts insrc/server/ai/prompts.server.tsare written per subject. Add the new subject's conventions there so the prompts are ready when AI returns. - Syllabus coverage. The manifest must cover every learning outcome in the current syllabus, in syllabus order. See Writing notes.