From 46f84c73d11c070e2a196bbcd7d66dbb5f95390a Mon Sep 17 00:00:00 2001 From: Siroco Date: Fri, 23 Oct 2020 02:16:20 +0200 Subject: [PATCH] Add page api template --- .../api-theme/layouts/_default/item_reduced.api.json | 5 +++++ themes/api-theme/layouts/_default/page.api.json | 12 ++++++++++++ themes/api-theme/layouts/_default/single.api.json | 1 + 3 files changed, 18 insertions(+) create mode 100644 themes/api-theme/layouts/_default/item_reduced.api.json create mode 100644 themes/api-theme/layouts/_default/page.api.json create mode 100644 themes/api-theme/layouts/_default/single.api.json diff --git a/themes/api-theme/layouts/_default/item_reduced.api.json b/themes/api-theme/layouts/_default/item_reduced.api.json new file mode 100644 index 0000000..f41c60b --- /dev/null +++ b/themes/api-theme/layouts/_default/item_reduced.api.json @@ -0,0 +1,5 @@ +{ + "name": "{{ .Slug }}", + "title": "{{ .Title }}", + "permalink": "{{ .Permalink }}", +} diff --git a/themes/api-theme/layouts/_default/page.api.json b/themes/api-theme/layouts/_default/page.api.json new file mode 100644 index 0000000..fd727cf --- /dev/null +++ b/themes/api-theme/layouts/_default/page.api.json @@ -0,0 +1,12 @@ +{ + "name": "{{ .Slug }}", + "title": "{{ .Title }}", + "title": "{{ .Permalink }}", + "featuredImage": "{{ .Params.featuredImage }}", + "featuredVideo": "{{ .Params.featuredVideo }}", + "n":"{{ .Params.n }}", + "s":"{{ .Params.s }}", + "e":"{{ .Params.e }}", + "o":"{{ .Params.o }}", + "content": {{ .Content | jsonify }} +} diff --git a/themes/api-theme/layouts/_default/single.api.json b/themes/api-theme/layouts/_default/single.api.json new file mode 100644 index 0000000..1e1a468 --- /dev/null +++ b/themes/api-theme/layouts/_default/single.api.json @@ -0,0 +1 @@ +{{ define "response" }} {{ .Render "item" }} {{ end }}