course.yml Reference

Every field in course.yml (course metadata) and lesson Markdown frontmatter. Fields marked * are required.

course.yml

Place this file at the root of your repository. All other paths are relative to it.

FieldTypeDefaultDescription
title*stringCourse title shown on the course page and marketplace.
slug*stringURL-safe identifier. Must be unique per creator. Used in /courses/<slug>.
descriptionstringShort description shown in search results and the course card.
price_centsinteger0Price in cents (USD). 0 = free. E.g. 2900 = $29.00.
currencystringusdISO 4217 currency code. Currently usd, eur, gbp supported.
repo_urlstringGitHub repository URL. Used for version tracking and re-imports.
lessons_dirstringlessons/Directory containing lesson Markdown files, relative to repo root.
quizzes_dirstringquizzes/Directory containing quiz YAML files, relative to repo root.
cover_imagestringURL or relative path to course cover image (1200×630 recommended).
tagsstring[]Searchable tags displayed on the course card and marketplace.
affiliate_pctinteger0Affiliate commission percentage (0–80). Affiliates receive this % of each sale they refer.
pricing_modelstringone_timeone_time or subscription (subscription requires Stripe subscription config).

Example course.yml

title: "TypeScript Deep Dive"
slug: "typescript-deep-dive"
description: "Master TypeScript from fundamentals to advanced patterns."
price_cents: 2900
currency: "usd"
repo_url: "https://github.com/you/typescript-deep-dive"
lessons_dir: "lessons/"
cover_image: "https://example.com/cover.png"
tags: ["typescript", "javascript", "programming"]
affiliate_pct: 20

Lesson Frontmatter

Each Markdown lesson file must begin with YAML frontmatter between --- delimiters.

FieldTypeDefaultDescription
title*stringLesson title shown in the sidebar and lesson header.
slug*stringURL-safe identifier. Inferred from filename if omitted.
order*integerSort order in the course sidebar. Start from 1.
accessstringpaidfree = public preview (no enrollment required). paid = gated.
descriptionstringShort summary shown in the sidebar tooltip and lesson header.
estimated_minutesintegerEstimated reading/watching time shown on the lesson header.
sandbox_urlstringStackBlitz, CodeSandbox, or CodePen embed URL. Gated for paid lessons.
quiz_slugstringSlug of a quiz YAML file in quizzes_dir to attach to this lesson.

Example lesson file

---
title: "Generics in TypeScript"
slug: "generics"
order: 5
access: paid
description: "Use generics to write reusable, type-safe code."
estimated_minutes: 20
sandbox_url: "https://stackblitz.com/edit/ts-generics-demo?embed=1"
quiz_slug: "generics-quiz"
---

# Generics in TypeScript

Generics allow you to write functions and classes that work with
multiple types while maintaining type safety...

Quiz YAML

Quiz files live in quizzes/ and define auto-graded questions. They can be hand-authored or generated via teachrepo quiz generate.

id: "generics-quiz"
title: "Generics Quiz"
pass_threshold: 70
questions:
  - type: multiple_choice
    prompt: "What is the primary purpose of generics?"
    choices:
      - "To make code run faster"
      - "To write reusable, type-safe code"
      - "To avoid null checks"
      - "To enable async/await"
    answer: 1
    explanation: "Generics let you write functions and classes that work with multiple types."
    points: 1

  - type: true_false
    prompt: "Generic constraints restrict which types can be used."
    answer: true
    explanation: "The 'extends' keyword adds constraints to generic type parameters."
    points: 1