Logo
Catppuccin for mdBook

Previews

🌻 Latte
🪴 Frappé
🌺 Macchiato
🌿 Mocha

Installation

Rust (Preferred)

  1. Install mdbook-catppuccin by running cargo install mdbook-catppuccin or download the latest release.

  2. Navigate to your mdBook's root directory (same location where the book.toml lives) and run mdbook-catppuccin install

  3. Build your mdBook using mdbook build and enjoy your new catppuccin flavours!

Manual

  1. Navigate to src/bin/assets within this repository

  2. Download all assets: index.hbs, catppuccin.css and catppuccin-admonish.css

    [!NOTE] The catppuccin-admonish.css file is NOT required if you are not using the mdbook-admonish plugin.

  3. Transfer downloaded assets to your mdBook's theme directory (the default directory is ./theme beside book.toml)

  4. Update additional-css key within the book.toml as shown below

    diff [output.html] -additional-css = [] +additional-css = ["./theme/catppuccin.css", "./theme/catppuccin-admonish.css"]

  5. Build your mdBook using mdbook build and enjoy your new catppuccin flavours!

Development

  1. Clone the repository and navigate to the repository root.

    shell git clone https://github.com/catppuccin/mdbook cd mdbook

  2. Run the following command to generate the CSS files that will be packaged by the rust binary:

    shell cd palette npm run build

  3. Build the rust binary using the following command:

    Note that the Minimum Rust Version is 1.63.0

    shell cargo build --release

  4. Test the binary by installing the new assets on the example directory:

    shell cd example ../target/release/mdbook-catppuccin install mdbook serve

🙋 FAQ

Acknowledgement

Inspiration for the install command came from mdbook-admonish which is another great mdBook pre-processor!

💝 Thanks to

 

Copyright © 2021-present Catppuccin Org