Algolia
22-May-2024
Algolia
Algolia is a search indexing service. This blog theme provides integration with Algolia.
Workflow
These are the general workflow. See [Adding search with Algolia](https://www.gatsbyjs.com/docs/adding-search-with-algolia/
graph TD
A[Create Algolia Account] --> B[Note API Key]
B --> C[Put API Key in environment]
C --> D[Build index using yarn build]
D --> E[Set API Key in prod build environment]
Local setup
Create the following entries in your .env file
GATSBY_ALGOLIA_APP_ID=
GATSBY_ALGOLIA_SEARCH_KEY=
GATSBY_ALGOLIA_WRITE_KEY=Fill in the value from Algolia API key page
# run this to trigger index rebuild
yarn clean-buildProd deployment (Netlify)
Attach build environment for the following env (similar with local setup)
GATSBY_ALGOLIA_APP_ID=
GATSBY_ALGOLIA_SEARCH_KEY=
GATSBY_ALGOLIA_WRITE_KEY=