From 93d47662b2ce5a6dc4867687386c912e8cd13720 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 29 Jun 2023 18:40:17 +0200 Subject: Added search option with lunr.js --- themes/simple/layouts/_default/index.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 themes/simple/layouts/_default/index.json (limited to 'themes/simple/layouts/_default/index.json') diff --git a/themes/simple/layouts/_default/index.json b/themes/simple/layouts/_default/index.json new file mode 100644 index 0000000..b8f3786 --- /dev/null +++ b/themes/simple/layouts/_default/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} +{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "type" .Type "permalink" .RelPermalink "summary" .Summary) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} -- cgit v1.2.3