Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use new nuxi module add command in installation #195

Merged
merged 7 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,12 @@
## Setup

```sh
yarn add @nuxtjs/algolia # yarn
npm i @nuxtjs/algolia # npm
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"
Expand Down
26 changes: 4 additions & 22 deletions docs/content/1.getting-started/1.quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,18 @@ description: ''
## Setup

1. **Install Algolia module**

::code-group
```bash [Yarn]
yarn add @nuxtjs/algolia
```
```bash [NPM]
npm install @nuxtjs/algolia --save
```
::

2. **Enable the module in your Nuxt configuration**

```js{}[nuxt.config.js]
export default defineNuxtConfig({
modules: ['@nuxtjs/algolia']
})
```bash
npx nuxi@latest module add 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:

Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cta:
secondary:
- Star on GitHub →
- https://github.com/nuxt-modules/algolia
snippet: yarn add @nuxtjs/algolia
snippet: npx nuxi@latest module add algolia
---

#title
Expand Down
Loading