https://github.com/catppuccin/mdbook
🎊 Soothing pastel theme for mdBook
https://github.com/catppuccin/mdbook
catppuccin hacktoberfest markdown mdbook mdbook-preprocessor mdbook-theme theme
Last synced: 5 months ago
JSON representation
🎊 Soothing pastel theme for mdBook
- Host: GitHub
- URL: https://github.com/catppuccin/mdbook
- Owner: catppuccin
- License: mit
- Created: 2022-07-24T03:50:29.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-07-09T13:37:13.000Z (11 months ago)
- Last Synced: 2025-07-25T20:06:50.967Z (11 months ago)
- Topics: catppuccin, hacktoberfest, markdown, mdbook, mdbook-preprocessor, mdbook-theme, theme
- Language: Handlebars
- Homepage: http://mdbook.catppuccin.com
- Size: 3.35 MB
- Stars: 200
- Watchers: 5
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

Catppuccin for mdBook
## Previews
🌻 Latte

🪴 Frappé

🌺 Macchiato

🌿 Mocha

## Usage
1. Initialise your mdBook with the theme files:
```shell
mdbook init --theme
```
2. Enter the book directory and remove all theme files except `index.hbs`:
```shell
cd
# Remove all files except index.hbs
find ./theme -type f ! -name 'index.hbs' -delete
# Remove the left over empty directories
rm -d fonts css
```
3. Download the [catppuccin.css](https://github.com/catppuccin/mdBook/releases/latest/download/catppuccin.css)
file from the [latest GitHub release](https://github.com/catppuccin/mdBook/releases/latest) to the `theme`
directory.
4. Update `additional-css` key within the `book.toml` as shown below
```diff
[output.html]
-additional-css = []
+additional-css = ["./theme/catppuccin.css"]
```
5. Edit the `index.hbs` file to include the Catppuccin flavors:
```diff
-
-
-
-
-
+
+
+
+
```
Additionally, you can use
[default-theme](https://rust-lang.github.io/mdBook/format/configuration/renderers.html?highlight=default-theme#html-renderer-options)
and
[preferred-dark-theme](https://rust-lang.github.io/mdBook/format/configuration/renderers.html?highlight=preferred-dark-theme#html-renderer-options)
keys for setting default light/dark mode themes in your `book.toml`.
E.g. To set the default theme to `latte` and default dark mode to `mocha`:
```diff
[output.html]
+ default-theme = "latte"
+ preferred-dark-theme = "mocha"
```
6. Build using `mdbook build` and enjoy your new Catppuccin flavors!
## Development
1. Clone the repository and navigate to the repository root.
```shell
git clone https://github.com/catppuccin/mdbook
cd mdbook
```
2. Generate the CSS files:
```shell
pnpm install
pnpm run build
```
## 💝 Thanks to
- [Hamothy](https://github.com/sgoudham)
- [winston](https://github.com/nekowinston)
Copyright © 2021-present Catppuccin Org