feat: Add json template
This commit is contained in:
parent
c06ff39ffe
commit
d5c0ebda14
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"data" : {{ block "response" .}}{{ end }}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "{{ .Title }}",
|
||||
"permalink" : "{{ .Permalink }}"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{{ define "response" }}
|
||||
[
|
||||
{{ range $index, $e := .Data.Pages }}
|
||||
{{ if $index }}, {{ end }}{{ .Render "item" }}
|
||||
{{ end }}
|
||||
]
|
||||
{{ end }}
|
|
@ -0,0 +1 @@
|
|||
{{ define "response" }} {{ .Render "item" }} {{ end }}
|
Loading…
Reference in New Issue