index.json 697 B

1234567891011121314
  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. "categories": [{{ range $cindex, $category := $page.Params.categoris }}{{ if $cindex }}, {{ end }}"{{ $category| htmlEscape }}"{{ end }}],
  9. "series": [{{ range $sindex, $series := $page.Params.series }}{{ if $sindex }}, {{ end }}"{{ $series| htmlEscape }}"{{ end }}],
  10. "description": "{{ htmlEscape .Description}}",
  11. "content": {{$page.Plain | jsonify}}
  12. }
  13. {{- end -}}
  14. {{- end -}}]