Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Mdbook Processor

Purpose

Builds mdbook documentation projects, planning every HTML page, theme asset, font, and static asset natively in Rust and caching each file as a product of its own.

How It Works

Discovers book.toml files indicating mdbook projects, parses book.toml and SUMMARY.md along with static assets to compute the output plan under output_dir, and runs mdbook build with MDBOOK_OUTPUT__HTML__HASH_FILES=false into a staging directory when any planned product is dirty. Staged outputs are verified against the plan via install_staged.

Source Files

  • Input: **/book.toml (plus SUMMARY.md, chapter .md files, and static assets)
  • Output: Planned HTML pages, theme/search/font assets, and copied static files under book (or configured output_dir)

Configuration

[processor.mass_generator.mdbook]
command = "mdbook"                     # The mdbook command to run
output_dir = "book"                    # Output directory for generated docs
loose_manifest = false                 # Warn instead of failing on plan mismatch
args = []                              # Additional arguments to pass to mdbook
dep_inputs = []                        # Additional files that trigger rebuilds when changed
KeyTypeDefaultDescription
commandstring"mdbook"The mdbook executable to run
output_dirstring"book"Output directory for generated documentation (relative to book.toml unless build.build-dir is set in book.toml)
loose_manifestbooleanfalseWarn instead of failing when mdbook build writes files not in the plan
argsstring[][]Extra arguments passed to mdbook
dep_inputsstring[][]Extra files whose changes trigger rebuilds

Batch support

Runs once per book.toml when any of its planned output files is dirty.

Clean behavior

This processor is a Mass Generator — rsconstruct clean outputs removes each planned output file (product.outputs) and sweeps any parent directories that are now empty. Pass --no-empty-dirs to keep them. See Clean behavior and rsconstruct clean.