Guide from GhatGPTSection titled Guide from GhatGPT
Algolia DocSearch is a free search service designed specifically for technical documentation and open-source projects. Below is the process for using Algolia DocSearch for indexing website documentation:
- Apply for DocSearch: Visit the Algolia DocSearch website, click the “Apply” button. Fill out the application form, providing information about your documentation and project. After submitting the application, you’ll need to wait for Algolia’s team to review it. Once approved, you’ll receive an email containing a DocSearch API Key and index name.
- Add DocSearch CSS to your website: In your website’s
<head>tag, add the following code to include DocSearch’s stylesheet:
indexNameyou received in the email:
- Add a search box: Add an HTML element, such as an
<input>tag, where you want to place the search box. Make sure its
classattribute matches the
inputSelectorused when initializing DocSearch. For example:
Now, when users use the search box on your documentation website, DocSearch will provide real-time search results. You can customize DocSearch’s behavior and style as needed. For more details and advanced configuration options, please refer to the DocSearch documentation.