mdBook

Write online books with mdBook

mdbook-github cat-development-tools

mdBook⮳ is a utility to create modern online books from Markdown files.

cargo install mdbook
mdbook serve --open

Let readers execute your sample code in the Rust playground

Rust by example - Playground cat-development-tools

Playground (Rust by example)

Augment mdbook with plugins

mdbook has a large number of third-party plugins⮳.

Check links with mdbook-linkcheck

mdbook-linkcheck mdbook-linkcheck-crates.io mdbook-linkcheck-github mdbook-linkcheck-lib.rs

mdbook-linkcheck is a backend for mdbook which will check your links for you.

Hide entire chapters with mdbook-private

mdbook-private mdbook-private-crates.io mdbook-private-github mdbook-private-lib.rs

An mdbook preprocessor that controls visibility of private chapters and sections within them

Hide pages with mdbook-hide

mdbook-hide mdbook-hide-crates.io mdbook-hide-github mdbook-hide-lib.rs cat-development-tools

A preprocessor for mdbook that adds support for hidden chapters

cargo install mdbook-hide

Deploy your book or documentation in a CD / CI pipeline

GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline.

GitHub Actions for mdBook allows you to build your site with mdbook. Linux (Ubuntu), macOS, and Windows are supported.

name: github pages

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  deploy:
    runs-on: ubuntu-20.04
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v2

      - name: Setup mdBook
        uses: peaceiris/actions-mdbook@v2
        with:
          mdbook-version: '0.4.10'
          # mdbook-version: 'latest'

      - run: mdbook build

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: ${{ github.ref == 'refs/heads/main' }}
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./book