Expand description
Pure transforms: Lesson → Quarto .qmd fenced-div snippet or complete
page, plus the static API key page (ADR-0019).
The conversion is a pure function — no I/O, no side effects, deterministic
(§2.1). The CLI command in blendtutor-cli is the thin effectful shell that
reads the file, calls this transform, and writes to stdout (§2.2).
§Field mapping
| YAML field | .qmd rendering |
|---|---|
exercise.prompt | prose after the opening div |
exercise.code_template | first fenced code block (if Some) |
lesson.checks | ```{.<lang> .checks} block (if non-empty) |
exercise.solution | ```{.<lang> .solution} block (if Some) |
exercise.hints | ::: {.hints} div (if Some) |
lesson.language | `language=“<r |
exercise.gotchas | ::: {.gotchas} div (if Some) |
exercise.success_criteria | ::: {.success-criteria} div (if Some, ADR-0020) |
lesson.packages | packages="a,b" attribute (if non-empty) |
exercise.llm_evaluation_prompt | EXCLUDED (author-only, ADR-0006) |
Enums§
- Export
Shape - What
export_lesson_to_qmdproduces (ADR-0019).
Functions§
- export_
lesson_ to_ qmd - Render a
Lessonas a Quarto.qmdfenced-div snippet. - key_
page_ qmd - The complete API key page, ready to save as
api-key.qmd(the filter’s defaultbt-key-pagetarget isapi-key.html). - thin_
lesson_ warning - Warn when
lessoncarries none of the aids that make the Quarto widget more than a Run button: nochecks, nosolution, and nohints.