From dda0a0eab19457598b71f2b2b2f978b09d3f95c7 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Mon, 15 Jul 2019 18:25:21 +0200 Subject: Start work on search feature with lunr --- layouts/home.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 layouts/home.json (limited to 'layouts/home.json') 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 -}} +] -- cgit v1.2.3