WindowsmacOSLinux

Where Does mdBook Store Config and Output?

mdBook book.toml, src chapters and book output folder layout on Windows, macOS and Linux.

Last updated

mdBook is file based. book.toml at the project root holds settings, src holds SUMMARY.md and chapters, and the built HTML lands in book.

There is no registry or AppData involved. The project folder is the whole story. This makes backup trivial: copy the folder and you have source plus config.

Where mdBook stores this, by platform

Windows
[BookDir]\book.toml

Config at root, Markdown under [BookDir]\src\, output in [BookDir]\book\. Delete book to force a clean rebuild. Keep book.toml and src in git; ignore book.

macOS
[BookDir]/book.toml

Same layout. mdbook binary usually sits in ~/.cargo/bin, but every book specific file stays under the project root. Move the folder to move the book.

Linux
[BookDir]/book.toml

Same arrangement. Build output goes to [BookDir]/book by default. CI should run mdbook build then publish that folder. Exclude book from version control.

Frequently asked questions

Where is the mdBook output?

In the book subfolder after mdbook build. That HTML is disposable output. Source of truth is book.toml plus src/SUMMARY.md and chapter files.

Which mdBook files should I commit?

Commit book.toml, src and theme overrides. Ignore book and any editor backups. A fresh clone plus mdbook build reproduces the site exactly.

Notice an outdated path? Let us know.