Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxtjs/algolia

Package Overview
Dependencies
Maintainers
7
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxtjs/algolia

Algolia module for Nuxt

  • 1.10.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.6K
decreased by-16.02%
Maintainers
7
Weekly downloads
 
Created
Source

@nuxtjs/algolia

@nuxtjs/algolia

npm version npm downloads Github Actions CI Codecov License

Algolia module for Nuxt

Features

  • Easy integration with Algolia
  • Handy composables like useAlgoliaSearch, useAsyncAlgoliaSearch
  • Support for Vue Instantsearch components
  • Support for Algolia Recommend
  • Support for Docsearch
  • Support for Automatic Indexing
  • Support for caching the requests and responses
  • Support for SSR requests

📖  Read the documentation

Preview

Open in StackBlitz

Setup

npx nuxi@latest module add algolia

Basic usage

Add ALGOLIA_API_KEY and ALGOLIA_APPLICATION_ID environment variables to .env file.

ALGOLIA_API_KEY="0fd1c4eba2d831788333e77c9d855f1d"
ALGOLIA_APPLICATION_ID="AGN9HEEKF3"

Now you can start using @nuxtjs/algolia in your app!

Client side:

<script setup lang="ts">
const { result, search } = useAlgoliaSearch('test_index')

onMounted(async () => {
  await search({ query: 'Samsung' })
})
</script>

<template>
  <div>{{ result }}</div>
</template>

Or SSR:

<script setup lang="ts">
const { data } = await useAsyncAlgoliaSearch({ indexName: 'test_index', query: 'Samsung' })
</script>

<template>
  <div>{{ data }}</div>
</template>

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using yarn dev or npm run dev

License

MIT License

Keywords

FAQs

Package last updated on 08 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc