Closed kdichev closed 5 years ago
What's the reasoning you went for moving this into the external file, and not making people require
it and pass it as reference? That way you're saving some complexity I think
This is just what my gut feeling went with, no apparent reason.
I think I was thinking that the way gatsby
exposes its api's is quite neat
Which other places accept a string as a file? 🤔
Actually when I think about it I do not remember where exactly did I get this idea from... 🔥 but I think you get the point of this proposal?
I am actually requiring the config in the plugin itself but added a way to override the path to it 🤷♂️
I think it's pretty cool, but I don't currently have the bandwidth to figure out how to make both ways of customizing live together in "peace". I'd be interested if you have a PR to see what you should change
@Haroenv How about await
ing the transformer
function for asynchronous workloads on the data? We use popularity data gathered from Google Analytics based on slugs provided by our CMS, which requires reducing the data asynchronous.
Since 0.4.0 you can do any async work inside the transformer. Thanks @brettinternet !
my use case needs to fetch a few datasets prior to creating the index, which this plugin does not allow me to do.
I modified the plugin to accept an exported function that the product developer can fetch data and return the index to the plugin to upload to algolia.
https://github.com/kdichev/gatsby-plugin-algolia-index
Let me know if you think this can be added to this plugin. @Haroenv