Nanobot: Polygonal Mascot

    @nuxtjs/algolia
    TypeScript icon, indicating that this package has built-in type declarations

    1.3.0 • Public • Published

    @nuxtjs/algolia

    @nuxtjs/algolia

    npm version npm downloads Github Actions CI Codecov License

    Algolia module for Nuxt

    Features

    • Nuxt 3 ready
    • Easy integration with Algolia
    • Handy composables like useAlgolia, useSearch, etc
    • Support for Vue Instantsearch components
    • Support for Algolia Recommend
    • Support for Docsearch
    • Support for Automatic Indexing
    • Support for caching the requests and responses
    • TypeScript support

    📖  Read the documentation

    Preview

    Open in StackBlitz

    Setup

    yarn add @nuxtjs/algolia # yarn
    npm i @nuxtjs/algolia # npm

    Basic usage

    Firstly, you need to add @nuxtjs/algolia to your Nuxt config.

    // nuxt.config.js
    
    {
        modules: [
            "@nuxtjs/algolia",
        ],
        algolia: {
            apiKey: "<YOUR_SEARCH_API_KEY>",
            applicationId: "<YOUR_APPLICATION_ID>",
        }
    }

    Then you can start using @nuxtjs/algolia in your setup function!

    <script setup>
    const { result, search } = useAlgoliaSearch("test_index"); // pass your index as param
    
    onMounted(async () => {
      await search({ query: "Samsung" });
    });
    </script>

    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

    Install

    npm i @nuxtjs/algolia

    DownloadsWeekly Downloads

    1,428

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    61.9 kB

    Total Files

    23

    Last publish

    Collaborators

    • antfu
    • danielroe
    • clarkdo
    • pi0
    • atinux
    • alexchopin
    • baroshem