diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-07-15 18:25:21 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-08-06 11:33:42 +0200 |
commit | dda0a0eab19457598b71f2b2b2f978b09d3f95c7 (patch) | |
tree | 035ca254fe7a8c7c7df316bce0b777f9a9dd06fe /layouts/home.json | |
parent | b199d72e5fd7ec76b3c17fc9a6368868978d6328 (diff) |
Start work on search feature with lunr
Diffstat (limited to 'layouts/home.json')
-rw-r--r-- | layouts/home.json | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/home.json b/layouts/home.json new file mode 100644 index 0000000..f090548 --- /dev/null +++ b/layouts/home.json @@ -0,0 +1,10 @@ +window.lunrData = [ +{{ range $index, $page := .Site.Pages }} + {{- if and $index (gt $index 0) -}},{{- end }} + { + "href": "{{ $page.RelPermalink }}", + "title": "{{ htmlEscape $page.Title }}", + "content": {{ $page.Plain | jsonify }} + } +{{- end -}} +] |