search-data.json
1 [ 2 {{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}} 3 {{- $pages = where $pages "Params.bookSearchExclude" "!=" true -}} 4 {{/* Remove until we know why it does not work, see https://github.com/alex-shpak/hugo-book/issues/528 */}} 5 {{/*- $pages = where $pages "Content" "not in" (slice nil "") -*/}} 6 {{- $pages = where $pages "Content" "!=" "" -}} 7 8 {{ range $index, $page := $pages }} 9 {{ if gt $index 0}},{{end}} { 10 "id": {{ $index }}, 11 "href": "{{ $page.RelPermalink }}", 12 "title": {{ (partial "docs/title" $page) | jsonify }}, 13 "section": {{ (partial "docs/title" $page.Parent) | jsonify }}, 14 "content": {{ $page.Plain | jsonify }} 15 } 16 {{- end -}} 17 ]