I have this JSON file I am using to create posts for a search page based on this guide. Inside the posts folder, I would like to either limit the posts shown by type: post or exclude a folder inside content/posts called ‘views’. I would appreciate some help on how to rework this code to achieve that. Thanks in advance.
[
{{- with $.Site.GetPage "/posts" }}
{{- range $index, $data := .Pages }}
{{- if $index }},{{ end }}
{
"title": "{{ $data.Title }}",
"url": "{{ $data.RelPermalink }}"
}
{{- end }}
{{- end }}
]