Skip to content

Commit

Permalink
chore: add mdbook to pre-commit hooks if installed (#59)
Browse files Browse the repository at this point in the history
This check ensures that the documentation can be built successfully if
`mdbook` is installed. If `mdbook-linkcheck` is installed as well, it
also checks that all links in the docs are valid.
  • Loading branch information
mlegner authored Jun 17, 2024
1 parent ed5df7f commit 8a9c845
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ repos:
hooks:
- id: markdownlint-cli2
args: ["--fix"]
pass_filenames: false
- repo: https://github.com/crate-ci/typos
rev: v1.22.0
hooks:
- id: typos
pass_filenames: false
- repo: local
hooks:
- id: mdBook
name: Build mdBook if it is installed
language: system
entry: (which mdbook && mdbook build) || ! (which mdbook >> /dev/null)
files: 'docs/.*'
pass_filenames: false

0 comments on commit 8a9c845

Please sign in to comment.