Skip to content

machlit/mdbook-machlit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdbook-machlit

The core documentation theme for Machlit; used with the mdbook markdown-based documenting tool.

Demo

Light Dark

Installation

  1. Create a new mdBook project with the --theme flag:
mdbook init --theme
  1. Navigate to the directory and in the theme/ folder, delete everything except index.hbs.

  2. Clone this repository:

git clone https://github.com/machlit/mdbook-machlit.git
  1. Copy the CSS files from src/ from the cloned repo and paste it into the theme/ folder.

  2. In your book.toml file, 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"]
  1. 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="machlit">machlit</button></li>
+ <li role="none"><button role="menuitem" class="theme" id="machlight">machlight</button></li>
  1. Run mdbook serve to preview your book locally.

  2. Enjoy!

License

This project is licensed under the MIT license.

About

Custom themes for the `mdbook` tool. Currently in use for Machlit's products and tools.

Topics

Resources

License

Stars

Watchers

Forks

Languages