hasura / gatsby-gitbook-starter

Generate GitBook style modern docs/tutorial websites using Gatsby + MDX
https://hasura.io/learn/graphql/react/introduction/
MIT License
984 stars 378 forks source link

Algolia API connexion issue #30

Closed Nierusan closed 4 years ago

Nierusan commented 4 years ago

Hi,

I tried a lot before writing here to insert my Algolia API to the template but I always got the same issue...

Capture d’écran 2019-10-14 à 16 45 06

I search on Gatsby and Algolia docs, but I've got no luck yet.

Capture d’écran 2019-10-14 à 16 49 21 This is what I wrote in my .env file with my APIs

Capture d’écran 2019-10-14 à 16 49 36 Several .env, .env.production, and I tried more, but always the same result.

I even tried to put in the config.js file, but I know this is not the way to do it.

Thanks in advance

praveenweb commented 4 years ago

@Nierusan - The environment variables have to be prefixed with GATSBY_. For example, ALGOLIA_APP_ID becomes GATSBY_ALGOLIA_APP_ID.