Add index templates
This commit is contained in:
parent
6f3d809d02
commit
1a8a3d0709
2 changed files with 15 additions and 0 deletions
3
themes/custom/layouts/index.html
Normal file
3
themes/custom/layouts/index.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
12
themes/custom/layouts/index.json
Normal file
12
themes/custom/layouts/index.json
Normal file
|
@ -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…
Reference in a new issue