Introduction
homelab-talos-ops
My home lab
Check commit message with git hooks
Add a prepare-commit-msg file in .git/hooks directory to support/enforce Conventional Commits naming convention.
#!/bin/bash
MESSAGE=$(cat $1)
COMMITFORMAT="^(feat|fix|docs|style|refactor|test|chore|perf|other)(\((.*)\))?: (.*)$"
if ! [[ "$MESSAGE" =~ $COMMITFORMAT ]]; then
echo "Your commit was rejected due to the commit message. Skipping..."
echo ""
echo "Please use the following format:"
echo "feat: feature example comment"
echo "fix(ui): bugfix example comment"
echo ""
echo "(feat|fix|docs|style|refactor|test|chore|perf|other)"
echo "More details on https://www.conventionalcommits.org/en/v1.0.0/"
exit 1
fi
Generate documentation with mdBook
Command line tool to create books with Markdown
For more info see mdBook Documentation
# Install mdBook binary
wget https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz
tar xvfz mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz
sudo mv mdbook /usr/local/bin
# Build book from docs directory
mdbook build