File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ {
3+ "total" : {{ len .Pages }},
4+ "data" : [
5+ {{- $pages := .Pages - }}
6+ {{- range $i, $p := $pages }}
7+ {{- if $i }},{{ end }}
8+
9+ {{- $ctx := partial "resolve-tenant.html" $p - }}
10+ {{- $uuid := $ctx.uuid - }}
11+
12+ {{- $children := $p.Pages }}
13+
14+ {
15+ "title" : {{ $p.Title | jsonify }},
16+ "description" : {{ $p.Description | jsonify }},
17+ "banner" : {{ $p.Params.Banner | absURL | jsonify }},
18+ "permalink" : {{ $p.Permalink | jsonify }},
19+ "orgId" : {{ $uuid | jsonify }},
20+ "courses" : [
21+ {{- range $j, $c := $children }}
22+ {{- if $j }},{{ end }}
23+ {
24+ "title" : {{ $c.Title | jsonify }},
25+ "description" : {{ $c.Description | jsonify }},
26+ "order" : {{ $c.Params.Order | jsonify }},
27+ "banner" : {{ $c.Params.Banner | absURL | jsonify }},
28+ "permalink" : {{ $c.Permalink | jsonify }}
29+ }
30+ {{- end }}
31+ ]
32+ }
33+ {{- end }}
34+ ]
35+ }
Original file line number Diff line number Diff line change 1+ {}
You can’t perform that action at this time.
0 commit comments