From 605313566728a2b7cca7792a670ea437d9f671b7 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Wed, 21 Jun 2023 19:06:56 +0200 Subject: [PATCH] use jsonl (JSON lines) as format for index information --- layouts/_default/index.json | 4 ---- layouts/_default/index.jsonl | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 layouts/_default/index.json create mode 100644 layouts/_default/index.jsonl diff --git a/layouts/_default/index.json b/layouts/_default/index.json deleted file mode 100644 index c618567..0000000 --- a/layouts/_default/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{{- range .Site.RegularPages -}} - {{- $s := (dict "title" .Title "contents" .Plain "link" .Permalink) -}} - {{- jsonify (dict "noHTMLEscape" true) $s }} -{{ end -}} diff --git a/layouts/_default/index.jsonl b/layouts/_default/index.jsonl new file mode 100644 index 0000000..7e8c002 --- /dev/null +++ b/layouts/_default/index.jsonl @@ -0,0 +1,4 @@ +{{- range .Site.RegularPages -}} + {{- $s := (dict "title" .Title "content" .Plain "link" .Permalink) -}} + {{- replace (jsonify (dict "noHTMLEscape" true) $s) "\\" "\\\\" }} +{{ end -}}