Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docsearch.js

Package Overview
Dependencies
Maintainers
5
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docsearch.js

Add an autocomplete dropdown to your documentation

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33K
increased by121.67%
Maintainers
5
Weekly downloads
 
Created
Source

Table of Contents generated with DocToc

docsearch

Add a search autocomplete to any documentation.

Currently on-demand, send an email to docsearch@algolia.com if you want documentation search on your website.

Usage

<link rel="stylesheet" href="//cdn.jsdelivr.net/docsearch.js/0/docsearch.min.css" />
<script src="//cdn.jsdelivr.net/docsearch.js/0/docsearch.min.js"></script>
documentationSearch({
  apiKey: apiKey, // Mandatory
  indexName: indexName, // Mandatory
  inputSelector: '#search-input' // Mandatory
});

Examples

How do I get an apiKey and indexName?

Send us an email with the url of the documentation website you would like to add search to.

How does it work?

The JavaScript library is a wrapper on top of our autocomplete.js library, along with default CSS styling of the dropdown.

The indexing of the website data itself is currently done by an internal tool (to be released).

Indexing of websites using docsearch takes places every day.

Development workflow

Local example

We use a simple documentation example website as a way to develop the docsearch.js library.

Requirements:

npm run dev
# open http://localhost:8080

Documentation website

This is the Jekyll instance running at https://community.algolia.com/docsearch.

Requirements:

npm run dev:docs
# open http://localhost:4000/docsearch/

MacOS

If you are using brew and you had brew install openssl, you may need to configure the build path of eventmachine with

bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include

FAQs

Package last updated on 16 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc