You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-54Lines changed: 59 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ This tools allows rendering Handlebars 3.0 templates, using as context data the
6
6
7
7
# Basic usage
8
8
9
-
```bash
10
-
$> render-template --help
9
+
```console
10
+
$ render-template --help
11
11
Usage:
12
12
render-template [OPTIONS] [template-file]
13
13
@@ -25,26 +25,25 @@ The tool supports rendering templates from a file or from stdin (for convenience
25
25
26
26
The source data is taken from the environment variables or from a data file, with properties-file format (key=value, a line for each pair). When a variable is defined both as an environment variable and in the data file, the latter will take precedence.
27
27
28
-
29
28
# Examples
30
29
31
30
## Render data from template file with environment variables
32
31
33
-
```bash
32
+
```console
34
33
# Create the template
35
-
$>echo'hello {{who}}'> template.tpl
34
+
$ echo'hello {{who}}'> template.tpl
36
35
# Render it without 'who' variable
37
-
$> render-template template.tpl
36
+
$ render-template template.tpl
38
37
hello
39
38
# Render it with 'who' variable defined
40
-
$> who=bitnami render-template template.tpl
39
+
$ who=bitnami render-template template.tpl
41
40
hello bitnami
42
41
```
43
42
44
43
## Render data from stdin with environment variables
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.
264
+
265
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
0 commit comments