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

Algolia Search needs application Key [solved] #68

Closed
wafer-li opened this issue Jan 22, 2018 · 2 comments
Closed

Algolia Search needs application Key [solved] #68

wafer-li opened this issue Jan 22, 2018 · 2 comments

Comments

@wafer-li
Copy link
Member

wafer-li commented Jan 22, 2018

To be simple:

Let's see here:

var isAlgoliaSettingsValid = algoliaSettings.applicationID &&
algoliaSettings.apiKey &&
algoliaSettings.indexName;

It needs an application key and etc.

So, where does it come from? Here:

algolia: {
applicationID: '{{ theme.algolia.applicationID }}',
apiKey: '{{ theme.algolia.apiKey }}',
indexName: '{{ theme.algolia.indexName }}',
hits: {{ theme.algolia_search.hits | json_encode }},
labels: {{ theme.algolia_search.labels | json_encode }}
}

It should be an application key field in the config.

hexo-theme-next/_config.yml

Lines 641 to 648 in 7e71b4b

algolia_search:
enable: false
hits:
per_page: 10
labels:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
hits_stats: "${hits} results found in ${time} ms"

Without it, it will complain about the Algolia Setting is invalid.

In fact, in the NexT 5.1.x, there is a doc describe the application keys:

image

@wafer-li
Copy link
Member Author

After a carefully check, this does not duplicate with #67

This bug I show is related to the lack of doc or lack of the algolia config.

@sli1989
Copy link
Collaborator

sli1989 commented Jan 27, 2018

i am going to take a PR in theme-next-algolia-instant-search to add the configurations, and wondering how to index the content with the latest hexo-Algolia.


maybe it's a different way to index using instantsearch.js.


it's too hard for me using instantsearch.js for full test search instead of hexo-algolia. 😂

@sli1989 sli1989 mentioned this issue Jan 27, 2018
13 tasks
@ivan-nginx ivan-nginx changed the title Algolia Search needs application Key Algolia Search needs application Key [solved] Mar 4, 2019
@theme-next theme-next locked as resolved and limited conversation to collaborators Apr 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants