Start work on search feature with lunr

This commit is contained in:
Alex Shpak
2019-07-15 18:25:21 +02:00
parent b199d72e5f
commit dda0a0eab1
26 changed files with 148 additions and 75 deletions
+10
View File
@@ -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 -}}
]