A Homebrew-inspired mdBook theme.
mdbook-brew is a theme for the mdBook utility. It replicates the cozy, caffeinated-like atmosphere found in Homebrew's website.
- mdBook should be installed, and you're good.
-
Create a new mdBook project with the
--themeflag:$ mdbook init --theme
-
Navigate to the directory and in the theme/ folder, delete everything except index.hbs.
-
Clone this repository:
$ git clone https://github.com/hitblast/mdbook-brew.git
-
Copy src/mdbook-brew.css from the cloned repo and paste it in the theme/ folder.
-
In your book.toml file, add the following line under the
[output.html]section:[output.html] theme = "mdbook-brew" additional_css = ["./theme/mdbook-brew.css"]
-
Edit the index.hbs file and modify the theme navigation menu's contents:
- <li role="none"><button role="menuitem" class="theme" id="light">Light</button></li> - <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li> - <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li> - <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li> - <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li> + <li role="none"><button role="menuitem" class="theme" id="mdbook-brew">mdbook-brew</button></li>
-
Run
mdbook serveto preview your book locally. -
Enjoy!
Note
The project showcased in the screenshots is cutler.
This project is licensed under the MIT license.

