Set Up New Quarto Book
When the user invokes /quarto-book-setup, scaffold a new Quarto book project.
Gather Information
Ask the user:
- •Project name — Directory and repo name
- •Book title — Display title for the book
- •Author — Who to credit
- •GitHub org/account — Where to host (optional, can skip GitHub setup)
- •Public or private — Repository visibility
Create Project Structure
code
project-name/
├── _quarto.yml
├── index.qmd
├── .gitignore
├── .claude/
│ └── CLAUDE.md
├── PLAN.md
├── README.md
├── images/
└── chapters/ # or use part1/, part2/ structure
└── intro.qmd
_quarto.yml Template
yaml
project:
type: book
output-dir: _book
execute:
freeze: auto
book:
title: "BOOK_TITLE"
author: "AUTHOR"
date: today
date-format: "MMMM YYYY"
chapters:
- index.qmd
- chapters/intro.qmd
format:
html:
theme:
light: cosmo
dark: darkly
toc: true
code-copy: true
.gitignore Template
code
_book/ _site/ .quarto/ *.quarto_ipynb .DS_Store .Rhistory .RData
Git and GitHub Setup
If user wants GitHub hosting:
- •Initialize git:
git init - •Create initial commit
- •Create repo:
gh repo create ORG/REPO --public --source=. --push - •Create gh-pages branch
- •Run
quarto publish gh-pages --no-prompt - •Provide the live URL
Project CLAUDE.md
Create .claude/CLAUDE.md with:
- •Project overview
- •Book structure
- •Publish workflow (
/publish) - •Any project-specific notes
Final Output
Tell the user:
- •Project created at
path/to/project - •Preview with
quarto preview - •Publish with
/publish - •Live URL (if GitHub Pages set up)