From 51dfe70f8407aad5f5ee5427a9e646f37027bddf Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 25 Nov 2020 11:11:34 +0100 Subject: [PATCH 1/7] feat: add Algolia DocSearch --- package.json | 3 + src/client/theme-default/Layout.vue | 12 +- .../components/AlgoliaSearchBox.vue | 158 +++++++++++++++++ src/client/theme-default/styles/vars.css | 4 +- yarn.lock | 162 ++++++++++++++++++ 5 files changed, 336 insertions(+), 3 deletions(-) create mode 100644 src/client/theme-default/components/AlgoliaSearchBox.vue diff --git a/package.json b/package.json index 5dfb64057152..178883519d39 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,11 @@ "url": "https://github.com/vuejs/vitepress/issues" }, "dependencies": { + "@docsearch/css": "^1.0.0-alpha.28", + "@docsearch/js": "^1.0.0-alpha.28", "@vue/compiler-sfc": "^3.0.3", "@vue/server-renderer": "^3.0.3", + "algoliasearch": "^4.8.1", "chalk": "^4.1.0", "debug": "^4.1.1", "diacritics": "^1.3.0", diff --git a/src/client/theme-default/Layout.vue b/src/client/theme-default/Layout.vue index 6b3f944355bc..9a009ec972f8 100644 --- a/src/client/theme-default/Layout.vue +++ b/src/client/theme-default/Layout.vue @@ -3,7 +3,9 @@