# Review mdBook preprocessors before building an unfamiliar book

Canonical: https://githtml.com/guides/mdbook-preprocessor-trust-and-order
Published: 2026-11-23
Publisher: WaveTech LLC / gitHtml

Treat mdBook preprocessors as programs that can transform content during a build. Inspect configured commands and dependencies before running an unfamiliar book, then compare a small fixture with the expected transformation. Verify ordering where processors depend on one another, and do not assume a successful build proves that warnings, examples, or includes were preserved.

## Inventory the preprocessing chain

Read the book configuration and identify built-in and custom preprocessors, their commands, and the content they are expected to change. A plugin name can look like a formatting option while actually invoking an executable. Check where that executable comes from and whether the project pins or documents its version. Inspect custom code for side effects relevant to your environment, including file access or network use. Avoid running an unreviewed book with production credentials in the shell. Write down why each preprocessor is needed so unnecessary transformations can be questioned rather than inherited indefinitely.

## Use a fixture that exposes transformation order

Create a small chapter with the markers, includes, or custom constructs that the configured chain processes. Include ordinary text and a literal code example that should remain untouched. Build in an appropriate test environment and compare the result with the expected output. If one processor creates syntax consumed by another, verify the documented ordering rather than relying on incidental executable discovery. The checklist below is a review scaffold, not a command to install unknown plugins. Keep malformed-input cases in the fixture too, because silent removal can be more dangerous than an explicit build failure.

````text
Preprocessor review
- Name and executable:
- Version and source:
- Intended transformation:
- Runs before or after:
- Files or services accessed:
- Missing-input behavior:
- Fixture comparison:
````

## Review the output as a changed document

Inspect headings, warnings, links, and code examples after preprocessing. Confirm that imported text comes from the intended files and revision, and that unrelated content remains intact. A processor that expands includes can introduce material outside the page an author thought they were sharing. Review publication scope accordingly. Record the processor versions and relevant configuration with the local build instructions. Re-run the fixture after upgrades or order changes, even when the Markdown source is unchanged. Keep any simplified reading export separate from the full book output, and verify its final text rather than assuming the preprocessing chain preserves meaning in every downstream format. Give included sample files their own ownership and review scope. Updating a shared snippet can alter several chapters at once even when none of those chapter files appears in the source diff.

1. List each preprocessor, executable source, version, purpose, and potential side effect.
2. Test a small chapter containing dependent transformations and content that must remain untouched.
3. Verify ordering and malformed-input behavior in a controlled environment.
4. Review expanded content and publication scope before sharing the generated book.

## Sources and further reading

- [mdBook preprocessors](https://rust-lang.github.io/mdBook/format/configuration/preprocessors.html)

## Related guides

- [Diagnose missing mdBook chapters from SUMMARY.md](https://githtml.com/guides/mdbook-summary-build-missing-chapters)
- [Distinguish MkDocs drafts, exclusions, and unlisted pages](https://githtml.com/guides/mkdocs-drafts-excluded-files-check)
- [Find why a MkDocs page is missing from navigation](https://githtml.com/guides/mkdocs-nav-page-missing)
- [Use MkDocs strict builds to investigate documentation warnings](https://githtml.com/guides/mkdocs-strict-warnings-local-review)

Editorial approach: https://githtml.com/guides/about
