Enable docsearch in documentation page

The example will be illustrated with docusaurus.

Docsearch is a free service offered by Algolia. You can find more details about here. You can contact them and they will reply you with email about the apikey and index name of the database they crawl from your docs site.

In the siteconfig.js configuration of docusaurus, all you need to do is add:

algolia: {
apiKey: '{api_key}',
indexName: '{index_name}',
algoliaOptions: { 'facetFilters': ["language:LANGUAGE"] },
placeholder: 'Seek and you can see'

the facetFilters if set with language is LANGUAGE will allow users to search the content at the language they are viewing, or you can hardcode with the language of your choice.

And here we go, check out : as an example illustration.


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store