zalando-incubator / hexo-theme-doc

A documentation theme for the Hexo blog framework
https://zalando-incubator.github.io/hexo-theme-doc
Other
246 stars 58 forks source link

Evaluate Algolia Search #150

Open bhaskarmelkani opened 5 years ago

bhaskarmelkani commented 5 years ago

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.

miaojf commented 5 years ago

https://community.algolia.com/docsearch/

bhaskarmelkani commented 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

rbarilani commented 5 years ago

@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?

miaojf commented 5 years ago

It's nice to be configurable , Do not generate related imports without configuration

bhaskarmelkani commented 5 years ago

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.