algolia / gatsby-plugin-algolia

A plugin to push to Algolia based on graphQl queries
https://yarn.pm/gatsby-plugin-algolia
Apache License 2.0
178 stars 45 forks source link

Possible to export to Index outside of gatsby-config.js? #19

Open jeffzickgraf opened 6 years ago

jeffzickgraf commented 6 years ago

I'm programmatically getting data to build pages from another plugin and would like to build the Algolia index after getting data from the other plugin. Is it possible to push to the index after my pages are built?

My data isn't available at the time the algolia plugin is resolved.

Seems like the query is required in the resolving of the gatsby-plugin-algolia.

Haroenv commented 6 years ago

Could you try instead putting gatsby-plugin-algolia last in your Gatsby config? I think plugins are ran sequentially.

If that doesn't work, could you please give access to a piece of code which has that issue?

jeffzickgraf commented 6 years ago

The algolia plugin is the last already.

I just sent a private message to your hello at haroen.me address where you may find code and a couple secrets..