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

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

#1861 in Text processing

Download history 16/week @ 2024-11-20 157/week @ 2024-11-27 68/week @ 2024-12-04 20/week @ 2024-12-11 18/week @ 2024-12-18 28/week @ 2025-01-01 43/week @ 2025-01-08 36/week @ 2025-01-15 17/week @ 2025-01-22 7/week @ 2025-01-29 40/week @ 2025-02-05 31/week @ 2025-02-12 19/week @ 2025-02-19 30/week @ 2025-02-26

121 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

~13–24MB
~371K SLoC