{{#yaml}}{{#docsearch}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script>
<script>
  docsearch({
    {{#app_id}}appId: '{{.}}',{{/app_id}}
    {{#debug}}debug: {{{.}}},{{/debug}}
    apiKey: '{{api_key}}',
    indexName: '{{index_name}}',
    inputSelector: 'input#search-input.form-control',
    transformData: function(hits) {
      return hits.map(function (hit) {
        hit.url = updateHitURL(hit);
        return hit;
      });
    }
  });
</script>
{{/docsearch}}{{/yaml}}
