From a655724370e831780089c58f1110e0510bda93ca Mon Sep 17 00:00:00 2001 From: Will Faught Date: Wed, 14 Dec 2022 17:58:48 -0800 Subject: [PATCH] Format dict vertically --- layouts/_default/home.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/layouts/_default/home.json b/layouts/_default/home.json index 9de28841..c9e894cb 100644 --- a/layouts/_default/home.json +++ b/layouts/_default/home.json @@ -1,5 +1,13 @@ {{- $.Scratch.Add "index" slice -}} {{- range where .Site.RegularPages "Params.excludesearch" "ne" true -}} -{{- $.Scratch.Add "index" (dict "title" (.Title | markdownify | plainify | htmlUnescape) "description" (.Description | markdownify | plainify | htmlUnescape) "date" .PublishDate "categories" .Params.categories "tags" .Params.tags "keywords" .Params.keywords "text" (strings.TrimRight " " (replace (.Plain | htmlUnescape) "\n" " ")) "link" .RelPermalink) -}} +{{- $.Scratch.Add "index" (dict + "title" (.Title | markdownify | plainify | htmlUnescape) + "description" (.Description | markdownify | plainify | htmlUnescape) + "date" .PublishDate + "categories" .Params.categories + "tags" .Params.tags + "keywords" .Params.keywords + "text" (strings.TrimRight " " (replace (.Plain | htmlUnescape) "\n" " ")) + "link" .RelPermalink) -}} {{- end -}} {{- $.Scratch.Get "index" | jsonify -}}