| Crates.io | mdbook-frontmatter-strip |
| lib.rs | mdbook-frontmatter-strip |
| version | 1.0.0 |
| created_at | 2025-11-25 19:21:36.541218+00 |
| updated_at | 2025-12-09 17:34:04.497034+00 |
| description | mdBook preprocessor that strips YAML frontmatter from chapters |
| homepage | |
| repository | https://github.com/saylesss88/mdbook-frontmatter-strip |
| max_upload_size | |
| id | 1950320 |
| size | 29,256 |
An mdBook preprocessor that strips YAML frontmatter from chapters before they
are rendered, so metadata like title, date, or tags does not appear in the
generated HTML.
cargo install mdbook-frontmatter-strip
Check your version:
mdbook-frontmatter-strip --version
mdbook-frontmatter-strip must be on your PATH so that mdbook can discover
and run it.
Tested with:
mdbook v0.5.1
Rust editions 2020 & 2024
Add the preprocessor to your book.toml:
[preprocessor.frontmatter-strip]
renderers = ["html"]
Then build as usual:
mdbook build
Supports fenced --- YAML frontmatter at the top.
Supports unfenced YAML only when there are at least 2 consecutive key: value
lines.
URLs like http://example.com at the top are not treated as frontmatter.
This crate includes integration tests that exercise fenced and unfenced frontmatter stripping, nested chapters, and common edge cases (like top-level URLs), to keep the behavior stable across mdBook updates.