Skip to content

Commit 9ff0b2b

Browse files
committed
update README
1 parent 2e056d6 commit 9ff0b2b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/templates/README.template.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer API_T
123123

124124
If you are not comfortable / don't want to hardcode your Number for example and/or Recipients in you, may use **Placeholders** in your Request.
125125

126-
You can use [**Variable**](#variables) `{{.NUMBER}}` Placeholders and **Body** Placeholders `{{@data.key}}`.
126+
| Type | Example | Note |
127+
| :--------------------- | :------------------ | :--------------- |
128+
| Body | `{{@data.key}}` | |
129+
| Header | `{{#Content_Type}}` | `-` becomes `_` |
130+
| [Variable](#variables) | `{{.VAR}}` | always uppercase |
127131

128132
| Type | Example |
129133
| :---- | :--------------------------------------------------------------- |
@@ -235,33 +239,30 @@ This makes advanced [Message Templates](#message-templates) like this one possib
235239
```yaml
236240
settings:
237241
messageTemplate: |
238-
{{- /* Variable declaration */ -}}
239242
{{- $greeting := "Hello" -}}
240-
{{- /* Simple variable output */ -}}
241243
{{ $greeting }}, {{ @name }}!
242-
{{- /* If-else conditional */}}
243244
{{ if @age -}}
244245
You are {{ @age }} years old.
245246
{{- else -}}
246247
Age unknown.
247248
{{- end }}
248-
{{- /* Range over slice */}}
249249
Your friends:
250250
{{- range @friends }}
251251
- {{ . }}
252252
{{- else }}
253253
You have no friends.
254254
{{- end }}
255-
{{- /* Range over map */}}
256255
Profile details:
257256
{{- range $key, $value := @profile }}
258257
- {{ $key }}: {{ $value }}
259258
{{- end }}
260-
{{- /* Nested templates */ -}}
261259
{{ define "footer" -}}
262260
This is the footer for {{ @name }}.
263261
{{- end }}
264262
{{ template "footer" . -}}
263+
------------------------------------
264+
Content-Type: {{ #Content_Type }}
265+
Redacted Auth Header: {{ #Authorization }}
265266
```
266267

267268
### API Token(s)
@@ -346,7 +347,7 @@ settings:
346347
```
347348

348349
Message Templates support [Standard Golang Templating](#templating).
349-
Use `@data.key` to reference Body Keys and `.KEY` for Variables.
350+
Use `@data.key` to reference Body Keys, `#Content_Type` for Headers and `.KEY` for Variables.
350351

351352
### Data Aliases
352353

0 commit comments

Comments
 (0)