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 / โ€ฆ)
โ”œโ”€โ”€ 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.0b1.tar.gz (547.9 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.0b1-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file quarto_coursegen-0.1.0b1.tar.gz.

File metadata

  • Download URL: quarto_coursegen-0.1.0b1.tar.gz
  • Upload date:
  • Size: 547.9 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.0b1.tar.gz
Algorithm Hash digest
SHA256 352416a07cb07a10eb5dbf96778823984b10fceead0eafcc7c7053050104808e
MD5 37005fd7d09dd6f03f445c928d6a5f5a
BLAKE2b-256 f9fcc9493758d645a1788a399693c93f6b2219a5f40e29440dfb6193aca0076c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quarto_coursegen-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 b22e3ea1f1dccdc2512db654318752fe561a135216dd7559166a385eb197559d
MD5 edea7f6616d19b034d756a1fae0914ae
BLAKE2b-256 dec888d25c520a6b30ead0c5c5c03985b5782f7205a966189a6835cb8150ce70

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