first commit
This commit is contained in:
22
layouts/api/item.json.json
Normal file
22
layouts/api/item.json.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": {{ .Params.id }},
|
||||
"sort": {{ .Params.sort }},
|
||||
"title": "{{ .Title }}",
|
||||
"questions": [{{ range $index, $question := .Params.questions }}
|
||||
{{ if $index }}, {{ end }}
|
||||
{
|
||||
"id": {{ $question.id }},
|
||||
"sort": {{ $index }},
|
||||
"title": "{{ $question.title }}",
|
||||
"answers": [{{ range $i, $answer := $question.answers }}
|
||||
{
|
||||
"id": {{ $answer.id }},
|
||||
"sort": {{ $i }},
|
||||
"title": "{{ $answer.title }}",
|
||||
"weight": "{{ $answer.weight }}",
|
||||
}
|
||||
{{ end }}]
|
||||
}
|
||||
{{ end }}]
|
||||
"permalink" : "{{ .Permalink }}"
|
||||
}
|
Reference in New Issue
Block a user