diff --git a/config.yml b/config.yml index 546a8bd..6ca5b34 100644 --- a/config.yml +++ b/config.yml @@ -19,6 +19,7 @@ outputs: home: - "html" - "rss" + - "json" section: - "html" - "rss" diff --git a/layouts/_default/list.json b/layouts/_default/list.json new file mode 100644 index 0000000..1388ca8 --- /dev/null +++ b/layouts/_default/list.json @@ -0,0 +1,14 @@ +{ + {{ range $i, $e := .Data.Pages.ByTitle }} + {{ if $i }}, {{ end }} + "{{ .RelPermalink }}": { + "id": "{{ .UniqueID }}", + "title": "{{ lower .Title }}", + "date": "{{ .Date }}", + "url": "{{ .Permalink }}", + "link": "{{ .RelPermalink }}", + "link_title": "{{ .LinkTitle }}" + "parent": "{{ if .Parent }}{{ lower .Parent.Title }}{{ end }}" + } + {{ end }} +}