Enable commit signing
git config commit.gpgsign trueInstall a pre-push git hook:
git config core.hooksPath .githooksAfter cloning the repository, follow the instructions below to run the documentation locally:
cargo docDocs for TODO(template) template_crate:
RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps -p template_crate --openAs an alternative to the pre-push git hook, you can use the pre-commit framework to manage and run hooks. pre-commit is Python-based and allows you to define a set of hooks that will run automatically on certain git events, such as pre-commit or pre-push.
In addition to the hooks defined in .githooks, pre-commit configuration also cleansup the code by removing trailing whitespace and ensuring that all files end with a newline.
To set up pre-commit, follow these steps:
-
Install pre-commit:
pip install pre-commit
-
Install the pre-commit hooks:
pre-commit install --hook-type pre-push