From 5f556187c3e8f661e512bfe6b0305b123a45e206 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 6 Dec 2020 17:46:18 +0100 Subject: [PATCH] search --- package-lock.json | 5 +++ package.json | 1 + src/components/Nav.svelte | 5 +++ src/components/SearchResult.svelte | 50 ++++++++++++++++++++++++++ src/routes/search.json.js | 36 +++++++++++++++++++ src/routes/search.svelte | 58 ++++++++++++++++++++++++++++++ 6 files changed, 155 insertions(+) create mode 100644 src/components/SearchResult.svelte create mode 100644 src/routes/search.json.js create mode 100644 src/routes/search.svelte diff --git a/package-lock.json b/package-lock.json index 8ac2dfb..2e72a29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -642,6 +642,11 @@ "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", "dev": true }, + "lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + }, "magic-string": { "version": "0.25.7", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", diff --git a/package.json b/package.json index 932b4f5..204138d 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "compression": "^1.7.1", "dayjs": "^1.9.7", "highlight.js": "^10.4.1", + "lunr": "^2.3.9", "polka": "next", "sirv": "^1.0.9", "svelte-cloudinary": "^0.2" diff --git a/src/components/Nav.svelte b/src/components/Nav.svelte index d309fb7..342f150 100644 --- a/src/components/Nav.svelte +++ b/src/components/Nav.svelte @@ -101,6 +101,11 @@

NB