diff --git a/hooked-book/source/cli/install.md b/hooked-book/source/cli/install.md index 14b723b..86b50e5 100644 --- a/hooked-book/source/cli/install.md +++ b/hooked-book/source/cli/install.md @@ -20,3 +20,7 @@ Below is the default script template that Hooked uses, where `hook_type` is the ```sh {{#include ../../../hooked-cli/source/templates/default.sh}} ``` + +You can provide your own template by using the `general.template` configuration setting. If you do, make sure you include a line somewhere that says `# Installed by Hooked.` for the [uninstall CLI command][cli-uninstall]. + +[cli-uninstall]: ./uninstall.md diff --git a/hooked-book/source/configuration/README.md b/hooked-book/source/configuration/README.md index 87bba2f..d24462d 100644 --- a/hooked-book/source/configuration/README.md +++ b/hooked-book/source/configuration/README.md @@ -10,11 +10,13 @@ The `general` [table][toml-table] is for main Hooked configuration. |-----|------|---------|-------------| | config | String | Hooked.toml | The configuration file to use. If your configuration file isn't `Hooked.toml` you should set this accordingly. | | directory | String | hooks | The directory Hooked looks in for anything related to files. For example: scripts, templates, etc. | +| template | Optional string | | Path to a custom template to be used when installing scripts. See the [install CLI command][cli-install] for more details. | ```toml [general] config = "Hooked.toml" directory = "hooks" +template = "template.sh" ``` ## Pre-commit @@ -43,5 +45,6 @@ on_failure = "continue" [^command-and-script]: When both a command and script are defined in a hook, *only* the command will be run. +[cli-install]: ../cli/install.md [toml-table]: https://toml.io/en/v1.0.0#table [toml-arrays-of-tables]: https://toml.io/en/v1.0.0#array-of-tables