This repository uses prek to run pre-commit hooks locally. prek is a fast, Rust-native drop-in replacement for pre-commit.
Install prek via Homebrew:
brew install prek lycheeFor other installation options, see the prek installation docs.
After cloning the repository, install the Git shims so hooks run automatically:
prek install # runs hooks on every commit
prek install --hook-type pre-push # runs lychee link checker on every pushRun all hooks against staged files:
prek runRun all hooks against the entire repository:
prek run --all-filesRun a specific hook by ID:
prek run trailing-whitespaceRun only the link checker:
prek run --hook-stage pre-push lycheeRun only the API docs check:
prek run --hook-stage pre-push apidocs-check| Hook | Stage | Description |
|---|---|---|
check-executables-have-shebangs |
commit | Ensures executable files have a shebang line |
end-of-file-fixer |
commit | Ensures files end with a newline |
trailing-whitespace |
commit | Removes trailing whitespace |
check-yaml |
commit | Validates YAML syntax |
check-merge-conflict |
commit | Detects leftover merge conflict markers |
yamllint |
commit | Lints YAML files for style issues |
lychee |
push | Checks for broken links in content/ |
apidocs-check |
push | Regenerates API docs and fails if they are out of date |
All commit-stage hooks run only against files under content/.
To update pinned hook repository revisions:
prek auto-update