diff options
Diffstat (limited to 'assets/search-data.json')
-rw-r--r-- | assets/search-data.json | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/assets/search-data.json b/assets/search-data.json new file mode 100644 index 0000000..9a137c3 --- /dev/null +++ b/assets/search-data.json @@ -0,0 +1,15 @@ +[ +{{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}} +{{- $pages = where $pages "Params.booksearchexclude" "!=" true -}} +{{- $pages = where $pages "Content" "not in" (slice nil "") -}} + +{{ range $index, $page := $pages }} +{{ if gt $index 0}},{{end}} { + "id": {{ $index }}, + "href": "{{ $page.RelPermalink }}", + "title": {{ (partial "docs/title" $page) | jsonify }}, + "section": {{ (partial "docs/title" $page.Parent) | jsonify }}, + "content": {{ $page.Plain | jsonify }} +} +{{- end -}} +] |