Skip to content

Commit

Permalink
Merge pull request #195 from nuxt-modules/module-installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Apr 4, 2024
2 parents f841d58 + ac6895b commit c1649cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 34 deletions.
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

0 comments on commit c1649cc

Please sign in to comment.