mdbook
creates online books by writing Markdown files
TLDR
Create an mdbook project in the current directory
SYNOPSIS
mdbook command [options]
DESCRIPTION
mdbook creates online books by writing Markdown files. Developed by the Rust community, it compiles a collection of Markdown files into a static website with navigation, search, and theming support.
A typical mdbook project contains a SUMMARY.md file that defines the book's structure and chapter organization. The tool processes these files and generates HTML, with support for code syntax highlighting, MathJax equations, and custom themes.
The serve command is particularly useful during writing, providing a local development server that automatically rebuilds and refreshes the browser when files change.
PARAMETERS
init
Create a new mdbook project with default structurebuild
Build the book from Markdown sourcesserve
Start a local web server with live reloadwatch
Rebuild automatically when source files changeclean
Remove the generated book output directorytest
Test Rust code samples in the book
CAVEATS
Requires Rust code blocks to be syntactically valid if mdbook test is used. Large books may have slow build times. Custom themes require understanding of Handlebars templating. Search functionality is client-side JavaScript.
HISTORY
mdbook was created by the Rust community as the tool for writing Rust documentation and "The Rust Programming Language" book. It has since become popular for technical documentation beyond Rust projects.
