Hooks

Hooks are Cheetah’s implementation of extensibility. They allow you to define commands in cheetah.toml to be run before or after the build.

A hook to run TailwindCSS whenever HTML or Markdown files are changed, for instance, might look like this:

[[hooks]]
name = "tailwind"
during = "PreBuild"
dev = { Watch = ["**/*.{html,md}"] }
command = "tailwindcss -i tailwind.css -o assets/tailwind.css"