Hi,
during generation of a json file with this script:
{{ $searchData := resources.Get "list.json" | resources.ExecuteAsTemplate "search-data.json" . }}
and this code on list.json:
[
{{ $pages := where .Site.Pages "Kind" "in" (slice "page" "post") }}
{{ $pages = where $pages "Content" "not in" (slice nil "") }}
{{ range $index, $page := $pages }}
{{ if ne $index 0 }},{{ end }}
{
"id": {{ $index }},
"href": "{{ $page.Permalink }}",
"title": {{ $page.Title | jsonify }},
"section": "{{ $page.Section }}",
"date" : {{ $page.Date.Format "2006.01.02" | jsonify }},
"body": {{ $page.Plain | jsonify }}
}
{{ end }}
]
i obtain a search-data.json containing only two brackets with nothing inside.
On config I corectly configured output:
[outputs]
home = ["HTML", "JSON", "RSS", "AMP"]
I dont undestand what is occurring to my searching code that previusly works.
Git repo: GitHub - antedoro/arberia-demo: Arberia Theme Demo Site
Have you any suggestion?