Implementing web site search capabilities includes using this searh.json file:
{
"results": [
{{- range $index, $page := .Site.RegularPages }}
{{- if $index -}} , {{- end }}
{
"href": {{ .Permalink | jsonify }},
"title": {{ .Title | jsonify }},
"body": {{ .Content | plainify | jsonify }}
}
]
}
When I try to sart the hugo development server I get this error:
$ hugo server
Error: add site dependencies: load resources: loading templates:
".../themes/tikva/layouts/_default/search.json:13:1":
parse failed: template: _default/search.json:13: unexpected EOF
The file seems complete to me and I don’t understand why there’s an
unexpected EOF when the enclusing braces match. Please educate me why this error exists.