Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Mdbook

mdbook is a Rust tool for generating documentation website from Markdown.

Install theme

mono-dev ships a configurator and scripts for theme and preprocessor configuration:

  • CSS for catppuccin themes. The theme files are forked and modified from the official catppuccin mdbook theme to my liking.
  • mdbook-nvim-treesitter for tree-sitter based highlighting, much better than highlight.js
version: '3'

includes:
  mdbook:
    taskfile: ../mono-dev/task/mdbook.yaml
    internal: true

tasks:
  install:
    - task: mdbook:config
  dev:
    cmds:
      - rm -rf book
      - shwoop book -w src --host -- {{.TASK_EXE}} build
  build:
    - task: mdbook:call-mdbook
      vars:
        COMMAND: build

Template .gitignore

/.cache
/book
/theme

Configuration

Run task install and the mdbook:config task will generate a base config. Edit the CHANGE ME fields.

To add nvim-treesitter support, add a #@mono-dev: nvim-treesitter {} directive in the preprocessor config section, then rerun the configurator.

#@mono-dev:preprocessor {
#@mono-dev:    nvim-treesitter {}
#@mono-dev:}