netlify.toml
file and environment variables.
Usage
TOML
Available parameters
netlify.toml
The following plugin settings are all optional.
Parameter | Type | Description |
---|---|---|
branches | String array | List of branches the crawler should build. By default, the plugin only builds your main branch, but you can build multiple branches. Each branch has a dedicated Algolia index, named netlify_<site-id>_<branch-name>_all . Ensure you target the right branch in your frontend.Default is ['master','main'] |
mainBranch | String | The main project’s branch. If defined, it’s used to propagate Algolia index setting modifications to other branches. Your main branch’s Algolia index settings will be used to create a new index when the plugin runs for the first time on a new branch. |
pathprefix | String | Your website’s prefix if it’s not at the root level. For example:pathPrefix = "/blog" # Will alias "/blog" to "/" |
customDomain | String | The custom domain you use (if you can’t define it through Netlify settings). For example: # Alias "example.com" to "<your-site-url>.netlify.app" customDomain = "example.com" |
renderJavaScript | Boolean | If true , the crawler uses JavaScript to render your website. Useful for single page apps.Default is false |
template | String | Used to modify how records and schemas are extracted. |
disabled | Boolean | If true , turns off the Netlify plugin but doesn’t remove it.Default is false |
Environment variables
The environment variables that needs to be set in your Netlify Site settings. They’re automatically added by the plugin.Variable | Required? | Type | Description |
---|---|---|---|
ALGOLIA_BASE_URL | Yes | String | URL to target. Should be https://crawler.algolia.com/ |
ALGOLIA_API_KEY | Yes | String | API key to authenticate the call to the crawler |
ALGOLIA_DISABLED | No | Boolean | If true , turns off the Netlify plugin but doesn’t remove it.Default is false |