Skip to content

Instantly share code, notes, and snippets.

@joshed-io
Last active December 19, 2017 03:41
Show Gist options
  • Save joshed-io/ceab3c1d80814fa1f7370ef883b4ee5f to your computer and use it in GitHub Desktop.
Save joshed-io/ceab3c1d80814fa1f7370ef883b4ee5f to your computer and use it in GitHub Desktop.
Algolia DocSearch snippet template
<!-- at the end of the HEAD -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<!-- in the BODY -->
<input type="text" id="docsearch-input" />
<!-- at the end of the BODY -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: '### REPLACE ME ####',
indexName: '### REPLACE ME ####',
inputSelector: '#docsearch-input', // replace w/ your element id if necessary
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment