#mdbook #preprocessor #chapter #markdown #hidden #hide

bin+lib mdbook-hide

A preprocessor for mdbook that adds support for hidden chapters

4 releases (breaking)

0.4.0 Sep 30, 2023
0.3.0 Aug 8, 2023
0.2.0 Jul 18, 2023
0.1.0 Jul 11, 2023

#1584 in Text processing

Download history 46/week @ 2024-06-06 41/week @ 2024-06-13 53/week @ 2024-06-20 47/week @ 2024-06-27 47/week @ 2024-07-04 111/week @ 2024-07-11 67/week @ 2024-07-18 87/week @ 2024-07-25 128/week @ 2024-08-01 34/week @ 2024-08-08 46/week @ 2024-08-22 56/week @ 2024-08-29 83/week @ 2024-09-05 24/week @ 2024-09-12 52/week @ 2024-09-19

244 downloads per month

BSD-3-Clause

17KB
129 lines

mdbook-hide

A preprocessor for mdbook that adds support for hidden chapters. The hidden chapters can be marked by adding a special Markdown comment. Based on the config, hidden chapters can be added or removed in the build.

Installation

Currently, this preprocessor is only available as a crate. In future, I'll add the binary releases as well. To install, run the command:

cargo install mdbook-hide

Usage

To use the preprocessor in your mdbook, add the following section in the book.toml. If the hide is set to true, then the hidden chapters will be removed.

[preprocessor.hide]
hide = true

To mark a chapter as hidden, add this special Comment anywhere in the Markdown file. It is better to have it at the top of the file for clarity.

<!--hidden-->

Dependencies

~12–23MB
~334K SLoC