Scaffold Quarto course websites from a course.yaml definition
Project description
๐ quarto-coursegen
๐ Documentation
A CLI tool that scaffolds Quarto course websites from a
single course.yaml definition file.
โจ Features
- Single source of truth โ define your entire course (modules, artifacts, schedule, instructors) in one
course.yamlfile - Two-stage pipeline โ separate generation (scaffold
.qmdstubs + Quarto config) from rendering (Quarto โ HTML/PDF) - Multiple output formats โ reveal.js slides, Beamer PDF, HTML handouts, PDF assignments, and a full course website from the same source
- Smart overwrite policy โ stubs are never overwritten after the first run; navigation and sub-project configs are always kept up to date
- Customisable templates โ override any built-in Jinja2 template locally without forking the tool
- i18n support โ UI strings and labels are externalised in
lang/*.yaml(English and German included) initcommand โ bootstraps a ready-to-use course repo with a sensible directory structure in one step
๐ฆ Installation
Requires Python โฅ 3.11.
pip install quarto-coursegen
Or with uv:
uv tool install quarto-coursegen
๐ Quick Start
# 1. Create and bootstrap a new course project
quarto-coursegen init my-course
cd my-course
# 2. Edit course.yaml (title, modules, artifacts, instructors, โฆ)
# 3. Scaffold .qmd stubs and Quarto config from course.yaml
quarto-coursegen generate
# 4. Fill in content in the generated .qmd files
# 5. Render with Quarto
quarto render # course website โ docs/
make slides # reveal.js + Beamer PDF โ docs/slides/
make handouts # PDF handouts โ docs/handouts/
For the full reference โ course.yaml schema, command options, templates,
i18n, rendering guide, Python API โ see the documentation.
๐ Project layout (generated course repo)
course-repo/
โ โ quarto-coursegen init
โโโ course.yaml โ edit this: title, modules, artifacts
โโโ Makefile โ rendering targets (make website / slides / โฆ)
โโโ assets/
โ โโโ styles/
โโโ templates/ โ built-in Jinja2 templates (customise locally)
โโโ lang/ โ built-in language files (customise locally)
โ
โ โ optional
โโโ coursegen.yaml โ tool config (overrides)
โ
โ โ quarto-coursegen generate
โโโ _quarto.yml โ generated once, then hand-editable
โโโ _quarto-nav.yml โ always regenerated
โโโ index.qmd โ generated once, then hand-editable
โโโ content/
โโโ modules/
โโโ slides/
โโโ handouts/
โโโ notes/
โโโ assignments/
โโโ syllabus.qmd
๐งโ๐ป Development
git clone https://github.com/xylomorph/quarto-coursegen.git
cd quarto-coursegen
uv sync --dev
uv run pytest
๐ ๏ธ Tech Stack
| Layer | Technology |
|---|---|
| Language | Python โฅ 3.11 |
| CLI framework | Typer |
| Templating | Jinja2 |
| Config parsing | PyYAML + Pydantic |
| Output formatting | Rich |
| Publishing | Quarto |
| Package manager | uv |
| Testing | pytest |
๐ Building the documentation
quarto render docs_src/ # output โ docs/
๐๏ธ Package layout
src/quarto_coursegen/
โโโ cli.py โ Typer app (init, generate commands)
โโโ config.py โ CoursegenConfig, resolve_config, i18n loading
โโโ core.py โ pure logic (normalize, resolve, collect)
โโโ env.py โ Jinja2 environment factory
โโโ generators.py โ generate() and per-file generator functions
โโโ initializer.py โ init_project()
โโโ writer.py โ write_file() with Rich output
โโโ package_data/
โโโ skeleton/ โ files copied by init (course.yaml, Makefile, โฆ)
โโโ templates/ โ built-in Jinja2 templates
โโโ lang/ โ built-in i18n files
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quarto_coursegen-0.1.0b2.tar.gz.
File metadata
- Download URL: quarto_coursegen-0.1.0b2.tar.gz
- Upload date:
- Size: 548.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8d3dd82b0bf26d747231972baee747990f7c792d9894cbb28d93551fcc51a55
|
|
| MD5 |
43c07069427b5612f9995f0001020849
|
|
| BLAKE2b-256 |
1cf73e79b7f34dc9c32bedd4d0eacace950267d039c40fd83e739ade3c21443c
|
File details
Details for the file quarto_coursegen-0.1.0b2-py3-none-any.whl.
File metadata
- Download URL: quarto_coursegen-0.1.0b2-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5be522f7f60d5842693cef742b82f7ab91cbf02da4d908a8c9ea4d1843a9b09
|
|
| MD5 |
4a6404f891ea37642e8ea53298b2df12
|
|
| BLAKE2b-256 |
7ffdbf74f2fb71460c7443f0c7c4e77523eb247437aa3f674b921f529fbe02bc
|