diff --git a/www/docs/customization/templates.md b/www/docs/customization/templates.md index 19bf11f6d..59cb0b64d 100644 --- a/www/docs/customization/templates.md +++ b/www/docs/customization/templates.md @@ -90,3 +90,25 @@ GOVERSION_NR=$(go version | awk '{print $3;}') goreleaser !!! warning Note that those are hypothetical examples and the fields `foo_template` and `example_template` are not valid GoReleaser configurations. + +## Custom variables + +On [GoReleaser Pro](/pro) you can also declare custom variables. +This feature is specially useful with [includes](/customization/includes), so you can have more generic config files. + +Usage is as simple as you would expect: + +```yaml +# .goreleaser.yml +variables: + description: my project description + somethingElse: yada yada yada +``` + +And then you can use those fields as `{{ .description }}`, for example. + +!!! warning + You won't be allowed to override GoReleaser "native" fields. + +!!! info + Custom variables is a [GoReleaser Pro feature](/pro). diff --git a/www/docs/pro.md b/www/docs/pro.md index fc5480612..c9c398fbb 100644 --- a/www/docs/pro.md +++ b/www/docs/pro.md @@ -4,7 +4,8 @@ GoReleaser Pro is now available with some unique features such as: - Ability to [include](/customization/includes/) config files (useful for common configurations); - Improved global hooks and [global after hooks](/customization/hooks/); -- [Monorepo support](/customization/monorepo)! +- [Monorepo support](/customization/monorepo); +- [Custom template variables](/customization/templates/#custom-variables) (goes well with [includes](/customization/includes/)). Get GoReleaser Pro