The core documentation theme for Machlit; used with the mdbook markdown-based documenting tool.
| Light | Dark |
|---|---|
![]() |
![]() |
- Create a new mdBook project with the
--themeflag:
mdbook init --theme-
Navigate to the directory and in the
theme/folder, delete everything exceptindex.hbs. -
Clone this repository:
git clone https://github.com/machlit/mdbook-machlit.git-
Copy the CSS files from
src/from the cloned repo and paste it into thetheme/folder. -
In your
book.tomlfile, add the following line under the[output.html]section:
[output.html]
default-theme = "machlight"
preferred-dark-theme = "machlit"
additional_css = ["./theme/machlit.css", "./theme/machlight.css"]- Edit the
index.hbsfile 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="machlit">machlit</button></li>
+ <li role="none"><button role="menuitem" class="theme" id="machlight">machlight</button></li>-
Run
mdbook serveto preview your book locally. -
Enjoy!
This project is licensed under the MIT license.

