From 90dc503d5907e33f6ef49f57c128d2cc33f0a6f1 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 2 Apr 2024 13:06:39 +0100 Subject: [PATCH 1/7] docs: use new `nuxi module add` command in installation --- README.md | 4 ++-- .../1.getting-started/1.quick-start.md | 12 +++--------- docs/content/1.index.md | 2 +- docs/content/2.advanced/3.docsearch.md | 19 +++---------------- 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index b9ae512..c247b3f 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ ## Setup ```sh -yarn add @nuxtjs/algolia # yarn -npm i @nuxtjs/algolia # npm +npx nuxi module add algolia +npx nuxi module add algolia ``` ## Basic usage diff --git a/docs/content/1.getting-started/1.quick-start.md b/docs/content/1.getting-started/1.quick-start.md index 81e17b8..fef8196 100644 --- a/docs/content/1.getting-started/1.quick-start.md +++ b/docs/content/1.getting-started/1.quick-start.md @@ -6,15 +6,9 @@ description: '' ## Setup 1. **Install Algolia module** - -::code-group - ```bash [Yarn] - yarn add @nuxtjs/algolia - ``` - ```bash [NPM] - npm install @nuxtjs/algolia --save - ``` -:: +```bash +npx nuxi module add algolia +``` 2. **Enable the module in your Nuxt configuration** diff --git a/docs/content/1.index.md b/docs/content/1.index.md index 7665383..8394b74 100644 --- a/docs/content/1.index.md +++ b/docs/content/1.index.md @@ -13,7 +13,7 @@ cta: secondary: - Star on GitHub → - https://github.com/nuxt-modules/algolia -snippet: yarn add @nuxtjs/algolia +snippet: npx nuxi module add algolia --- #title diff --git a/docs/content/2.advanced/3.docsearch.md b/docs/content/2.advanced/3.docsearch.md index 00c222e..58ba0a6 100644 --- a/docs/content/2.advanced/3.docsearch.md +++ b/docs/content/2.advanced/3.docsearch.md @@ -12,22 +12,9 @@ Websites like [nuxtjs.org](https://nuxtjs.org), [vuejs.org](https://vuejs.org) u ## Installation As DocSearch is an additional feature for @nuxt-modules/algolia, it needs two additional dependencies: - -::code-group - - ```bash [Yarn] - yarn add @docsearch/js @docsearch/css - ``` - - ```bash [NPM] - npm install @docsearch/js @docsearch/css - ``` - - ```bash [PNPM] - pnpm add @docsearch/js @docsearch/css - ``` - -:: +```bash +npx nuxi module add algolia +``` ## Configuration From 03c07f02564cec8f5bf9145d9851c9e54c223371 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 2 Apr 2024 13:14:09 +0100 Subject: [PATCH 2/7] docs: use nuxi@latest --- README.md | 4 ++-- docs/content/1.getting-started/1.quick-start.md | 2 +- docs/content/1.index.md | 2 +- docs/content/2.advanced/3.docsearch.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c247b3f..c435d49 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ ## Setup ```sh -npx nuxi module add algolia -npx nuxi module add algolia +npx nuxi@latest module add algolia +npx nuxi@latest module add algolia ``` ## Basic usage diff --git a/docs/content/1.getting-started/1.quick-start.md b/docs/content/1.getting-started/1.quick-start.md index fef8196..d3f0de3 100644 --- a/docs/content/1.getting-started/1.quick-start.md +++ b/docs/content/1.getting-started/1.quick-start.md @@ -7,7 +7,7 @@ description: '' 1. **Install Algolia module** ```bash -npx nuxi module add algolia +npx nuxi@latest module add algolia ``` 2. **Enable the module in your Nuxt configuration** diff --git a/docs/content/1.index.md b/docs/content/1.index.md index 8394b74..0436fe3 100644 --- a/docs/content/1.index.md +++ b/docs/content/1.index.md @@ -13,7 +13,7 @@ cta: secondary: - Star on GitHub → - https://github.com/nuxt-modules/algolia -snippet: npx nuxi module add algolia +snippet: npx nuxi@latest module add algolia --- #title diff --git a/docs/content/2.advanced/3.docsearch.md b/docs/content/2.advanced/3.docsearch.md index 58ba0a6..7a8fd33 100644 --- a/docs/content/2.advanced/3.docsearch.md +++ b/docs/content/2.advanced/3.docsearch.md @@ -13,7 +13,7 @@ Websites like [nuxtjs.org](https://nuxtjs.org), [vuejs.org](https://vuejs.org) u As DocSearch is an additional feature for @nuxt-modules/algolia, it needs two additional dependencies: ```bash -npx nuxi module add algolia +npx nuxi@latest module add algolia ``` ## Configuration From c693cb55b88ca98f9b1c4ba6a879b31e6b36a562 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 2 Apr 2024 13:33:18 +0100 Subject: [PATCH 3/7] chore: remove duplicate line --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c435d49..82fed26 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ ```sh npx nuxi@latest module add algolia -npx nuxi@latest module add algolia ``` ## Basic usage From 7b94370784336760ae7ddf6a3bc7f26c9de6fb05 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 2 Apr 2024 13:34:24 +0100 Subject: [PATCH 4/7] chore: revert --- docs/content/2.advanced/3.docsearch.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/content/2.advanced/3.docsearch.md b/docs/content/2.advanced/3.docsearch.md index 7a8fd33..c147af7 100644 --- a/docs/content/2.advanced/3.docsearch.md +++ b/docs/content/2.advanced/3.docsearch.md @@ -12,9 +12,12 @@ Websites like [nuxtjs.org](https://nuxtjs.org), [vuejs.org](https://vuejs.org) u ## Installation As DocSearch is an additional feature for @nuxt-modules/algolia, it needs two additional dependencies: -```bash -npx nuxi@latest module add algolia -``` + + +::code-group + + ```bash [Yarn] + yarn add @docsearch/js @docsearch/css ## Configuration From 97aaa11ddca0032aff0a9f71f28e82a1a171a0dd Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 2 Apr 2024 13:34:46 +0100 Subject: [PATCH 5/7] chore: revert --- docs/content/2.advanced/3.docsearch.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/content/2.advanced/3.docsearch.md b/docs/content/2.advanced/3.docsearch.md index c147af7..00c222e 100644 --- a/docs/content/2.advanced/3.docsearch.md +++ b/docs/content/2.advanced/3.docsearch.md @@ -13,11 +13,21 @@ Websites like [nuxtjs.org](https://nuxtjs.org), [vuejs.org](https://vuejs.org) u As DocSearch is an additional feature for @nuxt-modules/algolia, it needs two additional dependencies: - ::code-group ```bash [Yarn] yarn add @docsearch/js @docsearch/css + ``` + + ```bash [NPM] + npm install @docsearch/js @docsearch/css + ``` + + ```bash [PNPM] + pnpm add @docsearch/js @docsearch/css + ``` + +:: ## Configuration From 8d97e9f7d0cf9160df60d571cf40d29a4543d623 Mon Sep 17 00:00:00 2001 From: Jakub Andrzejewski Date: Thu, 4 Apr 2024 05:26:38 +0200 Subject: [PATCH 6/7] Update README.md --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 82fed26..16c8b7d 100644 --- a/README.md +++ b/README.md @@ -38,15 +38,7 @@ npx nuxi@latest module add algolia ## Basic usage -Firstly, you need to add `@nuxtjs/algolia` to your Nuxt config. - -```js -export default defineNuxtConfig({ - modules: ['@nuxtjs/algolia'] -}) -``` - -Furthermore, add `ALGOLIA_API_KEY` and `ALGOLIA_APPLICATION_ID` environment variables to .env file. +Add `ALGOLIA_API_KEY` and `ALGOLIA_APPLICATION_ID` environment variables to .env file. ```env ALGOLIA_API_KEY="0fd1c4eba2d831788333e77c9d855f1d" From ac6895bdb5fe2fbe6836c4dfd146cfb7c51fad4c Mon Sep 17 00:00:00 2001 From: Jakub Andrzejewski Date: Thu, 4 Apr 2024 05:27:47 +0200 Subject: [PATCH 7/7] Update 1.quick-start.md --- docs/content/1.getting-started/1.quick-start.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/docs/content/1.getting-started/1.quick-start.md b/docs/content/1.getting-started/1.quick-start.md index d3f0de3..d5f6f67 100644 --- a/docs/content/1.getting-started/1.quick-start.md +++ b/docs/content/1.getting-started/1.quick-start.md @@ -10,26 +10,14 @@ description: '' npx nuxi@latest module add algolia ``` -2. **Enable the module in your Nuxt configuration** - -```js{}[nuxt.config.js] -export default defineNuxtConfig({ - modules: ['@nuxtjs/algolia'] -}) -``` - -::alert{type="info"} -You can find more about configuring `@nuxtjs/algolia` [here](/getting-started/configuration). -:: - -3. **Add [ALGOLIA_API_KEY](https://www.algolia.com/doc/guides/security/api-keys/) and [ALGOLIA_APPLICATION_ID](https://www.algolia.com/account/api-keys/) to the .env** +2. **Add [ALGOLIA_API_KEY](https://www.algolia.com/doc/guides/security/api-keys/) and [ALGOLIA_APPLICATION_ID](https://www.algolia.com/account/api-keys/) to the .env** ```env ALGOLIA_API_KEY="0fd1c4eba2d831788333e77c9d855f1d" ALGOLIA_APPLICATION_ID="AGN9HEEKF3" ``` -4. **Use Algolia in your application** +3. **Use Algolia in your application** Client side: