capnfabs / grouse

A diff tool for Hugo static sites.
https://capnfabs.net/posts/grouse-diff-tool-hugo-static-site-generators/
MIT License
13 stars 2 forks source link

Grouse

Grouse Build

Like git diff, but for generated Hugo sites.

Imagine that, every time you pushed changes to your Hugo site, you also version-controlled the generated HTML/CSS/JS files. Then, when you were changing anything important on your site, you could also run git diff to see whether your changes had unintended side effects.

Grouse approximates that process by checking out previous commits, running Hugo on them, and then running git diff on the outputs.

Install

If you're on Mac OSX and have homebrew installed:

brew install capnfabs/tap/grouse

Otherwise, you can download the latest release for your platform directly from the releases page.

Usage

Quick reference

cd your-hugo-site
git log  # Should be a git repo.
# Show the difference between the generated output on these two commit references.
grouse commitRefA commitRefB

Specifying commits

Anything you can git diff against works as a commit reference for Grouse:

Command-line flags

Usage tips

Development instructions

Instructions for developers are in develop.md.

Not working / Questions / Comments?

Thanks for your feedback! File an issue or contact me.