algolia
algolia copied to clipboard
How should we use this plugin with nuxt 3 ?
I am working with nuxt content V2, but not sure how to index my contents.
Hey @jyotirmaybarman
Thanks for asking this question. The content crawler for released some time ago and it was meant to be working with Nuxt 2 so there is no support for nuxt content v2 yet.
However, it can be developed as another option for indexing Algolia content with another source, in this case, local content.
Could you please describe more how you would like to use it? I can think of an implementation of it so that it will solve your issue :)
@Baroshem Thanks for the clarification. Yes I was thinking about indexing local content. I have planned about creating a script for generating the objects for indexing & then index those with the help of algolia api.
I see.
I think it would have been an useful feature for the module.
Could you prepare a Proof of Concept solution based on the https://github.com/nuxt-community/algolia-module/blob/main/src/runtime/server/api/storyblok.ts and https://algolia.nuxtjs.org/advanced/er that would solve your issue?
I dont mean the coding, more like: "I would setup a variable here, it would then trigger a middleware that will fetch the content and populate algolia index, etc". When I will have a full example, I will try to implement the solution and we will see how it works :)
@Baroshem Awesome. I'll surely try as soon as I get time & will let you know.
@Baroshem Hi, This is my simple approach to the problem here : https://github.com/jyotirmaybarman/nuxt3-algolia-indexing-idea. It works but I think there is a concept of hooks in nuxt which I've no idea about. I don't know if it will be useful to you or not but whatever maybe the case, here is my solution 😅😅
Looks great @jyotirmaybarman
I will take a look at it tomorrow. You did a lot of work already! I know how to transform it into an addition to the module 😉
When developed and merged, I expect this feature to be released with 1.1.0 version that is planned for the next two weeks.
@Tahul
Hey, what is your opinion on that? This feature is related to NuxtContent ;)
As this is quite a big feature, let's plan it for 1.2.0 version of the module :)
Closing as no plans for implementing it right now and can be implemented without the need of the module