Algolia Search Integration
In this part of the documentation, we are going to show you how to integrate Algolia into your boilerplate template.
Follow the steps below to integrate Algolia:
- Login to your Algolia (opens in a new tab) dashboard, if you don’t have an account, go ahead and create one.
- Create a project: Go to the dashboard and click on Application then click on the Create Application button. Follow the steps to create the application.
Note: It’ll create an unnamed application. Go to Settings>Applications to change the name.
- Create Index: Click on the Get Started! button.
Once you click this you’ll be redirected to a page.
Enter your index name on that page and save the index. It’ll create an index for your Algolia project.
- Generate API key: From the Overview page go to API Keys.
- Go to All API Keys then click on the New API Key button. Now select the Index we created earlier. Select the permissions for the key as shown here:
Now that we created the index and the API Key we have to get those keys and update the env file.
You can get the Project ID from the Application button, and the Index name is the name of the index you created earlier.
NEXT_PUBLIC_ALGOLIA_PROJECT_ID = YOUR_PROJECT_ID;
NEXT_PUBLIC_ALGOLIA_API_KEY = THE_APIKEY_WE_CREATED;
NEXT_PUBLIC_ALGOLIA_INDEX = YOUR_INDEX_NAME;