mdbook
Create books from Markdown files
TLDR
Create an mdbook project in the current directory
Create an mdbook project in a specific directory
Clean the directory with the generated book
Serve a book at
Watch a set of Markdown files and automatically build when a file is changed
SYNOPSIS
mdbook subcommand [options]
PARAMETERS
build
Build the book from the source files.
serve
Build and serve the book locally for preview.
init
Initialize a new book in the current directory.
test
Run tests on your book to catch dead links and other issues.
clean
Remove the book's output directory.
edit
Edit book in the browser.
-h, --help
Display help information.
-V, --version
Display version information.
--dest-dir
Specify the output directory (defaults to 'book').
--open
Open the book in a browser after building (serve subcommand only).
--hostname
Bind to a specific hostname (serve subcommand only).
--port
Bind to a specific port (serve subcommand only).
--config
Specify the path to the book.toml file.
--theme
Specify a custom theme name.
DESCRIPTION
mdbook is a command-line tool used to create online books from Markdown files. It's designed for ease of use, focusing on simple syntax and efficient building, offering a modern and customizable web interface. The core of a mdBook project is a book.toml file, defining configurations, and a src directory, housing Markdown content. mdbook processes these Markdown files, converting them into HTML to generate a static website suitable for online viewing. It supports features like theming, preprocessors, and rendering options, allowing for customization of the book's appearance and functionality. Its built-in server simplifies local preview and testing. mdbook proves valuable for documentation, tutorials, or any long-form content suitable for a web-based book format. It emphasizes creating accessible and maintainable books with a focus on web-friendliness.
CONFIGURATION
The book.toml file configures the book.
It defines metadata like title, author, description, and specifies themes, preprocessors, and renderers.
MARKDOWN STRUCTURE
The book's content lives inside src/ directory. The order of chapters is defined by SUMMARY.md file.
SEE ALSO
git(1)