Hooks Examples

    pre-commit Hook to prevent changes to a zola project base_url ๐Ÿ”—

    #!/bin/sh
    
    # Check if we see the line with the base_url being changed
    git diff --cached config.toml | grep "^-base_url"
    if [ $? -eq 0 ]
    then
        echo "Error: Change detected to base_url"
        exit 1
    fi
    

    zola_chrono pre-push hook ๐Ÿ”—

    Link

    Conventional Commit Checking ๐Ÿ”—

    Simple (not robust) conventional commit checker. Instead of copying code here that may go out of date here is a link to one I have in use in a project. In that same folder are scripts to set it up if you donโ€™t already know how to do it. If you are still running into issues please reach out via github issues (see link in footer).