index.json 428 B

123456789101112
  1. [{{ range $index, $page := .Site.Pages }}
  2. {{- if ne $page.Type "json" -}}
  3. {{- if and $index (gt $index 0) -}},{{- end }}
  4. {
  5. "uri": "{{ $page.Permalink }}",
  6. "title": "{{ htmlEscape $page.Title}}",
  7. "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}],
  8. "description": "{{ htmlEscape .Description}}",
  9. "content": {{$page.Plain | jsonify}}
  10. }
  11. {{- end -}}
  12. {{- end -}}]