From fdc285bf02453f609b89eec51254632ca716b0b6 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 14 Jul 2017 21:24:06 +0100 Subject: [PATCH] Add JSON output format for pages --- config.yml | 1 + layouts/_default/single.json | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 layouts/_default/single.json diff --git a/config.yml b/config.yml index 45861de..546a8bd 100644 --- a/config.yml +++ b/config.yml @@ -26,6 +26,7 @@ outputs: page: - "html" - "txt" + - "json" staticDir: "static/build" diff --git a/layouts/_default/single.json b/layouts/_default/single.json new file mode 100644 index 0000000..f485230 --- /dev/null +++ b/layouts/_default/single.json @@ -0,0 +1,11 @@ +{ + "id": "{{ .UniqueID }}", + "title": "{{ .Title }}", + "date": "{{ .Date }}", + "image": "{{ absURL .Params.image }}", + "permalink": "{{ .Permalink }}", + "wordCount": "{{ .WordCount }}", + "linkTitle": "{{ .LinkTitle }}", + "section": "{{ .Section }}", + "content": "{{ .Permalink }}index.txt" +}