Add index templates

pull/2/head
Alexandre Iooss 3 years ago
parent 6f3d809d02
commit 1a8a3d0709

@ -0,0 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ end }}

@ -0,0 +1,12 @@
[{{ range $index, $page := .Site.Pages }}
{{- if ne $page.Type "json" -}}
{{- if and $index (gt $index 0) -}},{{- end }}
{
"uri": "{{ $page.Permalink }}",
"title": "{{ htmlEscape $page.Title}}",
"tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}],
"description": "{{ htmlEscape .Description}}",
"content": {{$page.Plain | jsonify}}
}
{{- end -}}
{{- end -}}]
Loading…
Cancel
Save