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

Add Algolia search #15

Open
ronaldtse opened this issue Nov 7, 2018 · 10 comments
Open

Add Algolia search #15

ronaldtse opened this issue Nov 7, 2018 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

For @strogonoff

  • 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: '31ca4bad475130bdaee582a0b9f40806', 
indexName: 'metanorma', 
inputSelector: '### REPLACE ME ####', 
debug: false // Set debug to true if you want to inspect the dropdown 
}); 
</script> 
@ronaldtse ronaldtse added the enhancement New feature or request label Nov 7, 2018
@strogonoff
Copy link
Contributor

@ronaldtse Do you have Algolia API key and index name for Ribose Open hub site? Your sample code above appears to be for Metanorma project site (which is good and works, but I’d like to test the search feature on a hub site too before releasing it as part of OP framework).

@ronaldtse
Copy link
Contributor Author

The API key is: 40a5c3929d2f6d51c9a062d2bdf00c20

The index however hasn't been created yet.

@ronaldtse
Copy link
Contributor Author

@strogonoff could we get this done soon? Thanks!

@strogonoff
Copy link
Contributor

strogonoff commented Jan 8, 2019 via email

@strogonoff
Copy link
Contributor

@ronaldtse this is blocked because we need API key and a dedicated index name for each site. (Currently I don’t have Algolia index name for open.ribose.com 🤷‍♂️)

@strogonoff strogonoff removed their assignment Jan 9, 2019
@ronaldtse
Copy link
Contributor Author

Index name: prod_riboseopen

@strogonoff
Copy link
Contributor

OK that was quick!

@strogonoff strogonoff self-assigned this Jan 9, 2019
strogonoff added a commit that referenced this issue Jan 9, 2019
@strogonoff
Copy link
Contributor

I get “Invalid Application-ID or API key” when I try searching while running the Jekyll site locally; pushing an update to see how it works in production. Should be live in a few min. Config used:

algolia_search:
  api_key: '40a5c3929d2f6d51c9a062d2bdf00c20'
  index_name: 'prod_riboseopen'

@strogonoff
Copy link
Contributor

Yep, Algolia error on production site, either index name or API key is incorrect 🤷‍♂️ @ronaldtse could you check?

api_key: '40a5c3929d2f6d51c9a062d2bdf00c20'
index_name: 'prod_riboseopen'

@ronaldtse
Copy link
Contributor Author

Just pinged you 👍

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

No branches or pull requests

2 participants