From 8df90589bf62d633eb1f0c1e6d4fc50445628923 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 23 Aug 2021 19:32:05 +0200 Subject: Make hugo generate a json index of the website --- layouts/index.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 layouts/index.json (limited to 'layouts') diff --git a/layouts/index.json b/layouts/index.json new file mode 100644 index 0000000..a526e68 --- /dev/null +++ b/layouts/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} + {{- $.Scratch.Add "index" (dict "title" .Title "subtitle" .Params.subtitle "description" .Params.description "tags" .Params.tags "content" .Plain "permalink" .Permalink) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} -- cgit v1.2.3