Skip to contents

Scaffolds a Quarto book set up to publish to GitHub Pages: project files, a DESCRIPTION, a CC BY-NC-SA 4.0 licence, the publish workflow, and a starter schedule.md for draft_book() to read.

Usage

create_course_book(
  path,
  title = NULL,
  author = NULL,
  open = rlang::is_interactive()
)

Arguments

path

Directory to create. Its basename becomes the project name.

title

Course title, used in _quarto.yml and DESCRIPTION.

author

Author name.

open

Open the new project in RStudio or Positron?

Value

Invisibly, the path to the project.

Details

This automates the sequence described in https://www.njtierney.com/posts/2026-07-09-put-course-online/. Two steps remain manual and are reported at the end: pushing to GitHub, and ticking "Use your GitHub Pages website" in the repository's About section.

Examples

path <- file.path(withr::local_tempdir(), "my-course")
create_course_book(path, title = "My Course", open = FALSE)
#> Error in check_path_is_directory(path_dir(path)): ✖ Directory /tmp/Rtmpe7cYU7/file1a722928f36 does not exist.
list.files(path, all.files = TRUE, no.. = TRUE)
#> character(0)