This plugin links your Netlify site with Algolia's Crawler.
It will trigger a crawl on each successful build.
Install the plugin
Read our full documentation here
Plugin inputs can be set in
netlify.toml. They're all optional.
['master', 'main']- List of branches the crawler should build.
By default, we only build your main branch, but this can be used to build multiple branches. Each of those will have a dedicated Algolia index, named
netlify_<site-id>_<branch-name>_all. You will need to target the right branch in your front-end code. Accepts star patterns too, like so:
*: matches all branches
feat/*: matches all branches starting with
*-bug: matches all branches finishing with
false- Use to disable the plugin without removing it.
mainBranch- The main project's branch. If set, it will be used to propagate your Algolia index settings modifications to other branches: Settings of the Algolia index of your main branch will be used to create the new index when the plugin runs for the first time on a new branch.
pathPrefix- The prefix of your website if it's not at the root level. Putting "pathPrefix: /blog" will alias
customDomain- The custom domain that you use, if it's not possible to define it on your Netlify's settings. Putting "customDomain: example.com" will alias
template- Used to modify the way we extract records and their schema. Supported templates:
'hierarchical'. More information on how the extraction works in the dedicated extraction documentation.
ALGOLIA_BASE_URL: URL to target, usually https://crawler.algolia.com/. Can be modified locally to target a local instance of the crawler (only for Algolia employees).
ALGOLIA_API_KEY: [Optional in dev] API Key to authenticate the call to the crawler.
ALGOLIA_DISABLED: [Optional] Set to
trueto disable the plugin without removing it.
For a local run, those need to be set in
cp .env.example .env and modifying the values to fit your needs.