Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Algolia Search #633

Open
damassi opened this issue Feb 12, 2020 · 3 comments
Open

Implement Algolia Search #633

damassi opened this issue Feb 12, 2020 · 3 comments

Comments

@damassi
Copy link
Member

damassi commented Feb 12, 2020

From Algolia customer support:


Congratulations, your search is now ready!
I've successfully configured the underlying crawler and it will now run every 24h.

You're now a few steps away from having it working on your website:

  • Copy the following CSS/JS snippets and add them to your page
<!-- at the end of the HEAD -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<!-- at the end of the BODY -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: 'e4ea4437446d07b0549e0db7928d92d1',
indexName: 'artsy_palette',
inputSelector: '### REPLACE ME ####',
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>

Please open a pull request if want to leverage your configuration!

Feel free to get back to us if you have any issues or questions regarding the integration.

We'd also be happy to get your feedback and thoughts about DocSearch - so we can continue to improve it.

Have a nice day :)


@zephraph - would you mind logging into Algolia admin with your email (per the above) and updating to artsy@it?

@zephraph
Copy link
Contributor

@damassi, done.

@pepopowitz
Copy link
Contributor

I started looking into this. I found a Gatsby plugin to wire it up for us. It works great on initial page load, but once you start clicking around to different routes, it loses the ability to search. I found an issue that is kind of similar, but slightly different..but it does have a lead that I'm planning on investigating today.

@damassi
Copy link
Member Author

damassi commented Feb 21, 2020

I believe this is tied to component organization in Palette, rather than the plugin; on route change the sidebar is re-rendered. Lets pair if there are any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants