thom4parisot / hexo-algolia

Index your hexo website content to Algolia Search.
https://npmjs.com/hexo-algolia
MIT License
88 stars 15 forks source link

README.md typos #37

Closed ifyour closed 5 years ago

ifyour commented 5 years ago

image

const client = algoliasearch(algoliaConfig.applicationID, algoliaConfig.apiKey);

This is applicationId, not applicationID. 🌚

thom4parisot commented 5 years ago

What you show here is the output of a DOM value. <meta property="algolia:search" data-application-id="..."> is

The configuration key is applicationID, and it populates the aforementioned attribute. Cf. https://github.com/oncletom/hexo-algolia/blob/3853bd5c85500cfb77b377b99459650f6acac18b/lib/helpers/search_config.js#L8-L10

I understand it's confusing, and I'll think of something to make it easier to configure the Algolia Client, which I assume is the main issue.

ifyour commented 5 years ago

https://github.com/oncletom/hexo-algolia/blob/3853bd5c85500cfb77b377b99459650f6acac18b/lib/helpers/search_config.js#L8-L10

Here is correct. because this applicationID defined in _config.yml.

In our site, we should get this id from meta, but this default value is applicationId. Just a typo in README.md.

ifyour commented 5 years ago

image

LoL~ 😎

thom4parisot commented 5 years ago

Aaah, yes I see, on this line:

const client = algoliasearch(algoliaConfig.applicationID, algoliaConfig.apiKey);

Right sorry, I misunderstood which application ID you were referring to. I'm thinking of aligning variable spelling to avoid confusion.