Skip to content

Commit

Permalink
DOC-4344: Add Algolia site keys to playbooks (#121)
Browse files Browse the repository at this point in the history
* Replace Algolia config values with playbook variables

* Conditionally load the DocsSearch script
  • Loading branch information
eric-schneider authored Apr 23, 2024
1 parent 5ca3349 commit 567723b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/partials/body-end-scripts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
<script async src="{{{uiRootPath}}}/js/vendor/zooming.js"></script>

<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
{{#with site.keys}}
{{#if (and algoliaAppId algoliaIndexName algoliaApiKey)}}
<script>
docsearch({
container: '#docsearch',
appId: '2ELPRZR9UC',
indexName: 'crawler_docsearch-astra',
appId: '{{algoliaAppId}}',
indexName: '{{algoliaIndexName}}',
{{!-- This is the public API key which can be safely used in frontend code. --}}
apiKey: '1f4acbf51d118e4137e9a63b38bd8456',
apiKey: '{{algoliaApiKey}}',
})
</script>
{{/if}}
{{/with}}
{{> intercom}}

0 comments on commit 567723b

Please sign in to comment.