yarn add storyblok-algolia-indexer # yarn
npm i storyblok-algolia-indexer # npm
Initialize storyblok-algolia-indexer
in your Node.js based serverless function
new StoryblokAlgoliaIndexer({
algoliaAppId,
algoliaApiAdminToken,
algoliaIndexName,
storyblokContentDeliveryApiToken,
options
})
const options = {
starts_with: 'articles/',
per_page: 100,
page: 1,
version: 'draft'
}
Create webhook in Storyblok that will trigger this indexer accordingly to this article