0.0.6 • Published 5 years ago
@algolia/crawler-netlify-plugin v0.0.6
crawler-netlify-plugin
This plugin links your Netlify site with Algolia's Crawler.
It will trigger a crawl on each successful build.
Environment variables
ALGOLIA_API_KEYOptional in dev API Key to authenticate the call to the crawler.ALGOLIA_BASE_URLOptional Defaults tohttps://crawler.algolia.com/.
For a local run, those need to be set in .env using cp .env.example .env and modifying the values to fit your needs.
Scripts
yarn dev: run dev environmentyarn release: build & publish the library
Development
Pre-requisites
Only accessible to Algolia employees.
- Access to the Algolia team on Netlify (only granted to Algolia employees).
- Access to the test website in this org: https://app.netlify.com/sites/crawler-netlify-plugin/
- Clone the repo and link it to the test website on Netlify:
git clone git@github.com:algolia/algoliasearch-netlify.git cd algoliasearch-netlify yarn yarn netlify link # Accept linking it with the current git remote, it'll detect the correct site automatically - Setup
.envby copying the example file:
Make sure the values in this file are good.cp .env.example .env
Running the dev env
yarn devIt builds the site locally, running the local version of the plugin.
To change the crawler target from the prod one to a local instance, simply change in your .env ALGOLIA_BASE_URL.