hugo-toha/layouts/_default/index.json
Chuso Pérez 0848be17ba
#42 Add suppor for client-side search (#227)
* Add support for client-side search with Fuse.js. Implements #42.

Based on https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae

* Move search form code repeated in many places to one single template.

* Add search box in home page.

* Fix search UI + Some improvements

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Remove search.md from exampleSite

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2021-03-13 23:43:10 +06:00

5 lines
372 B
JSON

{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{- $.Scratch.Add "index" (dict "title" .Title "hero" (partial "helpers/get-hero.html" .) "date" (.Date.Format "January 2, 2006") "summary" .Summary "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}