How to make it work with Contentful Source
Opened this issue · 2 comments
Deleted user commented
First of all thank you for this great plugin!
Can you tell me how to make it work with Contentful Source?
travis-r6s commented
Hey @jrpersico-spurred, you should be able to use it as per the readme, you just need to configure the correct types to add; you can see available types by checking the GraphQL explorer. For example, you may have ContentfulPost
, which you would then configure like so:
{
use: 'gridsome-plugin-flexsearch',
options: {
searchFields: ['title'],
collections: [
{
typeName: 'ContentfulPost',
indexName: 'Post',
fields: ['title', 'handle', 'description']
}
]
}
}
Deleted user commented
Thank you for your reply.
I had misunderstood how to set indexName and typeName.