Coder Social home page Coder Social logo

nuxt-meilisearch's Introduction

@nuxtjs/supabase

nuxt-meilisearch

Latest Stable Version License Twitter Follow


Meilisearch module for Nuxt

Features

Setup

Install nuxt-meilisearch !

npm install nuxt-meilisearch  // yarn add nuxt-meilisearch

Add it to the modules section of nuxt.config.ts

{
...
 modules: [
   'nuxt-meilisearch'
 ],
 meilisearch: {
   hostUrl: '<YOUR_MEILISEARCH_HOST_URL>',
   apiKey: '<YOUR_MEILISEARCH_API_KEY>',
   instantSearch: true // default true
 }
 ...
}

Usage

You can load Meilisearch client with composables

<script setup>

const client = useMeilisearchClient();

</script>

Then is your template you can use all Algolia Vue 3 Instantsearch components.

Exemple:

<template>
  <div>
    Nuxt module playground for nuxt-meilisearch !

    <ais-instant-search
      :search-client="client"
      index-name="movies"
    >
      <ais-configure :hits-per-page.camel="10" />
      <ais-search-box
        placeholder="Search here…"
        class="searchbox"
      ></ais-search-box>
      <ais-hits>
        <template v-slot="{ items }">
          <ul>
            <li
              v-for="{id,title,poster} in items"
              :key="id"
            >
              <h1>{{ title }}</h1>
              <img :src="poster" :alt="`Poster from ${title}`">
            </li>
          </ul>
        </template>
      </ais-hits>

    </ais-instant-search>
  </div>
</template>

Roadmap

  • Init - Open github repo
  • Main Meilisearch JS client
  • Load options in single object
  • Move inject via composables instead of plugin
  • Conditional algolia vue3 lib , default true
  • Publish NPM
  • Use client from SERVER side to manipulate items
  • Nice demo site
    • meilisearch instance from cloud
    • publish on netlify
  • Create Docs site ( docus ) then publish
  • Demo on StackBlitz for quick hack

Development

  • Run npm run dev:prepare to generate type stubs.
  • Use npm run dev to start playground in development mode.

Licence

MIT Licence

nuxt-meilisearch's People

Contributors

xlanex6 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.