renovate/docs/usage/templates.md

33 lines
1,007 B
Markdown
Raw Normal View History

2020-04-07 07:23:41 +00:00
---
title: Template fields
description: Explain Renovate template fields
2020-04-07 07:23:41 +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`.
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
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
## Exposed config options
2020-04-07 07:23:41 +00:00
<!-- Automatically insert exposed configuration options here -->
## Other available fields
2020-04-07 07:23:41 +00:00
<!-- Insert runtime fields here -->
## 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.