This repository is a working example of a Boring College book. It demonstrates the exact file structure and format the sync tool expects, and serves as a template for authors who want to publish their own books.
The book itself covers Hello World in 12 popular programming languages: Python, JavaScript, Go, Rust, Java, C, C++, TypeScript, Ruby, PHP, Swift, and Kotlin.
Every Boring College book is a directory with this layout:
your-book-slug/ ← directory name becomes the URL slug
book.yaml ← book metadata and chapter list
chapters/
01-first-chapter.md ← numbered markdown files
02-second-chapter.md
...
title: Your Book Title
description: A short, one or two sentence description.
cover: https://example.com/cover.jpg # optional — omit the line if you have no cover
chapters:
- 01-first-chapter.md
- 02-second-chapter.md| Field | Required | Notes |
|---|---|---|
title |
Yes | Displayed everywhere in the UI |
description |
Yes | Used in meta tags and the book listing |
cover |
No | Public image URL; omit the field entirely if none |
chapters |
Yes | Ordered list of filenames in chapters/ |
- Filename:
NN-chapter-slug.md— two-digit zero-padded index, then a kebab-case slug - The first line must be
# Chapter Title— an H1 heading. The syncer reads this as the chapter title. Everything after it is the chapter content. - Content is standard GitHub Flavored Markdown. Code blocks with language hints get syntax highlighting.
# Chapter Title
Chapter content goes here. Standard GFM Markdown.
```python
print("code blocks are syntax highlighted")
---
## Syncing to a Boring College instance
Clone the book repo into your `$BOOKS_DIR`:
```bash
cd $BOOKS_DIR
git clone https://github.com/boringcollege/hello-world.git
Run the sync tool from your Boring College installation:
# Sync this book only
./bin/sync --books-dir $BOOKS_DIR --book hello-world
# Sync all books
./bin/sync --books-dir $BOOKS_DIR
# Preview changes without writing to DB
./bin/sync --books-dir $BOOKS_DIR --book hello-world --dry-runAfter a successful sync the book appears in the admin panel at /admin/books. Set the category, adjust chapter access (free vs. paid), and publish.
This repo ships a Claude Code skill that converts any Markdown into Boring College format automatically. If you have an existing document — a long single Markdown file, a folder of notes, an exported Notion page — open this repository in Claude Code and run:
/transform-book path/to/your-document.md
Or for a directory of Markdown files:
/transform-book path/to/your-chapters/
The skill:
- Splits content into chapters on
# H1headings - Strips YAML frontmatter and extracts title/description from it
- Generates
NN-slug.mdfilenames - Writes
book.yamlwith the correct chapter list - Reports what was created and the next sync command to run
See .claude/commands/transform-book.md for the full specification.
- Fork or duplicate this repository
- Edit
book.yaml— changetitle,description, and thechapterslist - Replace the files in
chapters/with your own - Each chapter file must begin with
# Chapter Title - Commit and push
- Clone this repo
- Open it in Claude Code
- Run
/transform-book path/to/your-markdown - Review the output, then push
- One idea per chapter. Chapters can be short — 300 words is fine.
- Start with the H1. Every chapter file must begin with
# Title. This is not optional; the syncer uses it. - Filenames are slugs.
01-getting-started.md→ chapter slug01-getting-started. Keep them lowercase, kebab-case, no spaces. - Images. Link to publicly accessible URLs. Uploading images is supported if Cloudflare R2 is configured on the Boring College instance.
- Code blocks. Always specify the language hint for syntax highlighting:
```python,```go,```bash, etc.
To add a language chapter to this book:
- Fork the repo
- Create
chapters/NN-language.mdfollowing the pattern of existing chapters - Add the filename to
book.yamlin the right position - Open a pull request
The chapter should include: a brief language history/description, prerequisites and installation, the complete Hello World code, a line-by-line explanation, how to run it, the expected output, and a closing note.