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

MDBOOK010 - Preprocessor Validation

Missing or invalid preprocessor configuration.

Why This Rule Exists

mdBook preprocessors transform content before rendering. Using preprocessor directives without proper configuration causes silent failures or build errors.

Examples

Incorrect

Using a directive without configuring the preprocessor:

{{#katex}}
E = mc^2
\{{/katex}}

Without [preprocessor.katex] in book.toml.

Correct

First, configure in book.toml:

[preprocessor.katex]

Then use the directive:

{{#katex}}
E = mc^2
\{{/katex}}

Common Preprocessors

PreprocessorPurpose
katexMath equations
mermaidDiagrams
tocTable of contents
templateTemplate expansion
admonishCallout boxes

Configuration

This rule has no configuration options.

Rule Details

  • Rule ID: MDBOOK010
  • Aliases: preprocessor-validation
  • Category: MdBook
  • Severity: Warning
  • Stability: Experimental
  • Auto-fix: No