2020-04-07 07:23:41 +00:00
|
|
|
---
|
2020-12-13 22:32:55 +00:00
|
|
|
title: Template fields
|
2020-11-16 08:07:23 +00:00
|
|
|
description: Explain Renovate template fields
|
2020-04-07 07:23:41 +00:00
|
|
|
---
|
|
|
|
|
2020-12-13 22:32:55 +00:00
|
|
|
# Template fields
|
2020-04-07 07:23:41 +00:00
|
|
|
|
|
|
|
In order to provide flexible configuration, Renovate supports using "templates" for certain fields like `branchName`.
|
|
|
|
|
2020-11-02 08:52:37 +00:00
|
|
|
Renovate's templates use [handlebars](https://handlebarsjs.com/) under the hood.
|
|
|
|
You can recognize templates when you see strings like `{{depName}}` in configuration fields.
|
2020-04-07 07:23:41 +00:00
|
|
|
|
2020-11-02 08:52:37 +00:00
|
|
|
Below you can find lists of fields/values that you can use in templates.
|
|
|
|
Some are configuration options passed through, while others are generated as part of Renovate's run.
|
2020-04-07 07:23:41 +00:00
|
|
|
|
2020-12-13 22:32:55 +00:00
|
|
|
## Exposed config options
|
2020-04-07 07:23:41 +00:00
|
|
|
|
|
|
|
<!-- Automatically insert exposed configuration options here -->
|
|
|
|
|
2020-12-13 22:32:55 +00:00
|
|
|
## Other available fields
|
2020-04-07 07:23:41 +00:00
|
|
|
|
|
|
|
<!-- Insert runtime fields here -->
|
2021-11-14 19:49:05 +00:00
|
|
|
|
|
|
|
## Additional Handlebars helpers
|
|
|
|
|
|
|
|
### stringToPrettyJSON
|
|
|
|
|
|
|
|
If you want to print pretty JSON with Handlebars you can use the built-in function `stringToPrettyJSON` like this:
|
|
|
|
|
|
|
|
`{{{stringToPrettyJSON myvar}}}`
|
|
|
|
|
|
|
|
In the example above `myvar` is a variable/field, that contains valid JSON.
|