Giter VIP home page Giter VIP logo

Comments (7)

tpage99 avatar tpage99 commented on May 23, 2024 2

Actually misunderstood you and thought to hardcode in the config file. Tracked down function in the plugin and hardcoded them and got further than I have (as I actually saw it start to index in console) but then it threw an error.

Several errors and reconfiguring later I found it was primarily a casing issue. I was trying pass appID instead of appId.

Thanks for your patience and assistance! I was doing a whole bunch of other things wrong haha like using the example docs instead of pulling my data from frontmatter, as I'm just using markdown files.

from gatsby-plugin-algolia.

crtormen avatar crtormen commented on May 23, 2024 1

Ok, so you have defined those variables in your .env file,
GATSBY_ALGOLIA_APP_ID and GATSBY_ALGOLIA_ADMIN_KEY, right?

Try hardcode them in the algoliasearch function.

Example:

algoliasearch('Y8WP8K7U3C', '91672f58492a3cd67dc5a386cc83c208')

Is a good idea to set your indexName anyway.

from gatsby-plugin-algolia.

crtormen avatar crtormen commented on May 23, 2024 1

Im glad to know it!
But, particularly, I found very complicated the example they passed there https://www.gatsbyjs.org/docs/adding-search-with-algolia

I'm using another plugin, forked from this here, - Gatsby plugin algolia search
Found it better because it makes partial updates, only when a new post is added, or an existing post is updated or deleted. Different from this, which updates all the records on each update.

from gatsby-plugin-algolia.

tpage99 avatar tpage99 commented on May 23, 2024 1

O wow yeah, the tutorial had several holes that I had to change that threw me off but I figured it was just me and being very inexperienced with search.

Thank you for pointing me to the other plugin that seems like it makes so much more sense considering the partial updates. I had read a little bit about a pull request on here to incorporate the partial updates and that seems like it should be a standard.

from gatsby-plugin-algolia.

crtormen avatar crtormen commented on May 23, 2024

It seems that you has not defined the application ID provided by Algolia in your environment.
Did you follow these instructions:? Gatsby plugin Algolia

from gatsby-plugin-algolia.

tpage99 avatar tpage99 commented on May 23, 2024

Sorry, should have included gatsby-config setup:

...
    {
      resolve: `gatsby-plugin-algolia`,
      options: {
        appID: process.env.GATSBY_ALGOLIA_APP_ID,
        apiKey: process.env.GATSBY_ALGOLIA_ADMIN_KEY,
        queries,
        chunkSize: 10000, // default: 1000
      },
    },
...

I know environment variables are passing correctly, as I'm using for Google Maps API. Just for some reason Algolia credentials it's not being passed on build.

I just opened up an Algolia account today - dunno if that matters. I was also following tutorial from here: https://www.gatsbyjs.org/docs/adding-search-with-algolia/

I noticed that the plugin has an option for indexName so I'll try to add that as well.

from gatsby-plugin-algolia.

tpage99 avatar tpage99 commented on May 23, 2024

Yes, had a .env for development and production but no luck.

Good thought on hardcoding but this did not work for me either. I'll keep trying to figure out what I'm doing wrong, but it continues to suggest I'm not passing in the appID. Tried gatsby clean and deleting node modules to npm install again but also no luck. Algolia is picking up that it's getting pinged in the dashboard but nothing is being indexed.

from gatsby-plugin-algolia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.