mdbook-private

Crates.iomdbook-private
lib.rsmdbook-private
version0.2.2
sourcesrc
created_at2023-02-20 09:36:57.350973
updated_at2023-10-10 08:40:33.941614
descriptionAn mdbook preprocessor that controls visibility of private chapters and sections within them
homepage
repositoryhttps://github.com/RealAtix/mdbook-private
max_upload_size
id789667
size126,712
Raz (RealAtix)

documentation

README

mdbook-private

build crate.io downloads license

An mdbook preprocessor for defining and optionally hiding private sections and chapters in your book.

Usage

Installation

cargo install mdbook-private

Configuration in book.toml

# Default options
[preprocessor.private]
remove = false
style = true
notice = "CONFIDENTIAL"
chapter-prefix = "_"

Options Explained

  • remove (boolean): Determines whether to remove or retain sections marked as private.
  • style (boolean): Styles the private sections (when retained) using blockquote CSS.
  • notice (string): Adds a notice to styled sections at the top right corner.
  • chapter-prefix (string): If the remove option is active, chapters with filenames prefixed with this value will be excluded.

Markdown Usage

For a hands-on example, explore the example-book.

# Summary

- [Chapter 1](./chapter_1.md)
  - [Sub chapter](./_chapter_1_sub.md)
- [Chapter 2](./_chapter_2.md)
  - [Sub chapter](./chapter_2_sub.md)

Note: With the remove option enabled, only "Chapter 1" will be retained.


<!--private
This is some highly confidential material which we want to hide when sharing with external parties.

Another *line*.

# A title that should remain a title  
Yet another **line**.
-->

Example output

Commit count: 15

cargo fmt