Module quarto_export

Module quarto_export 

Source
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.promptprose after the opening div
exercise.code_templatefirst 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.packagespackages="a,b" attribute (if non-empty)
exercise.llm_evaluation_promptEXCLUDED (author-only, ADR-0006)

Enums§

ExportShape
What export_lesson_to_qmd produces (ADR-0019).

Functions§

export_lesson_to_qmd
Render a Lesson as a Quarto .qmd fenced-div snippet.
key_page_qmd
The complete API key page, ready to save as api-key.qmd (the filter’s default bt-key-page target is api-key.html).
thin_lesson_warning
Warn when lesson carries none of the aids that make the Quarto widget more than a Run button: no checks, no solution, and no hints.