Open bhaskarmelkani opened 5 years ago
hexo.io also uses Algolia for in-site search.
Here's the issue for it. https://github.com/hexojs/site/issues/129
@miaojf @bhaskarmelkani Seems cool but if I understood correctly, algolia is a service as Google Search that requires to have your site crawled, which is fine for public sites but not for private sites.
So I say that we should support both (lunr.json) and algolia, up to the user to decide which one to use.
WDYT?
It's nice to be configurable , Do not generate related imports without configuration
Yes, Algolia will provide both searches inside the document using the already generated index and also providing other functionalities like crawling. There are some plugins to enable Algolia for Hexo.
These plugins can be used in the theme with little customization if there is a need.
Evaluate Algolia Search
Currently, the theme uses lunr for searching inside the documentation. There are some pitfalls for using lunr [the generated index file(lunar.json) can grow super big with the data in the documentation, support for multiple languages like Chinese, etc].
This ticket is to discuss the pros and cons of this implementation in the theme and decide if its worth while to do this change and replace lunr with Algolia.