Add support for client-side search with Fuse.js. Implements #42.
Based on https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae
This commit is contained in:
parent
946a8bd4d5
commit
9fc697e7b1
5 changed files with 245 additions and 0 deletions
5
layouts/_default/index.json
Normal file
5
layouts/_default/index.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{- $.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 -}}
|
Loading…
Add table
Add a link
Reference in a new issue