Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (strapi-plugin-strapi-algolia) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Strapi plugin strapi-algolia
A strapi plugin to sync your strapi content with Algolia.
Getting started
1. Installation
With Yarn
yarn add strapi-plugin-strapi-algolia
With NPM
npm install --save strapi-plugin-strapi-algolia
2. Setup environment variables
ALGOLIA_ADMIN_KEY=your_algolia_app_id
ALGOLIA_APP_ID=your_algolia_api_key
3. Configure the plugin
In Javascript
Add the following code to ./config/plugins.js
'use strict';
module.exports = ({ env }) => ({
// ...
'strapi-algolia': {
enabled: true,
config: {
apiKey: env('ALGOLIA_ADMIN_KEY'),
applicationId: env('ALGOLIA_APP_ID'),
contentTypes: [
{ name: 'api::article.article' },
// ...
],
},
},
});
In Typescript
Add the following code to ./config/plugins.ts
export default ({ env }) => ({
// ...
'strapi-algolia': {
enabled: true,
config: {
apiKey: env('ALGOLIA_ADMIN_KEY'),
applicationId: env('ALGOLIA_APP_ID'),
contentTypes: [
{ name: 'api::article.article' },
// ...
],
},
},
});
All configurations options
Property | Description | Type | Default value |
---|---|---|---|
applicationId | Algolia application ID (required) | string | |
apiKey | Algolia API Key (required) | string | |
indexPrefix | Text | string | |
contentTypes | Text | Array | |
contentTypes.name | Text (required) | string | |
contentTypes.index | Text | string | |
contentTypes.idPrefix | Text | string | |
contentTypes.populate | Text | object | All fields |