Skip to main content

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.yaml file
  • Two-stage pipeline โ€” separate generation (scaffold .qmd stubs + 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)
  • init command โ€” 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quarto_coursegen-0.1.0b2.tar.gz (548.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quarto_coursegen-0.1.0b2-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

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

Hashes for quarto_coursegen-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 a8d3dd82b0bf26d747231972baee747990f7c792d9894cbb28d93551fcc51a55
MD5 43c07069427b5612f9995f0001020849
BLAKE2b-256 1cf73e79b7f34dc9c32bedd4d0eacace950267d039c40fd83e739ade3c21443c

See more details on using hashes here.

File details

Details for the file quarto_coursegen-0.1.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for quarto_coursegen-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 e5be522f7f60d5842693cef742b82f7ab91cbf02da4d908a8c9ea4d1843a9b09
MD5 4a6404f891ea37642e8ea53298b2df12
BLAKE2b-256 7ffdbf74f2fb71460c7443f0c7c4e77523eb247437aa3f674b921f529fbe02bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page