HenrikBengtsson/pkgdown.extras

docsearch: Add support for 'algoliaOptions'

Closed this issue · 0 comments

<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script><script>
  docsearch({
    
    apiKey: 'aa6e02fc501886fb0f7c91ac4e300456',
    indexName: 'futureverse',
    algoliaOptions: { 'facetFilters': ['project:future'] },
    inputSelector: 'input#search-input.form-control',
    transformData: function(hits) {
      return hits.map(function (hit) {
        hit.url = updateHitURL(hit);
        return hit;
      });
    }
  });
</script>