diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2022-02-08 00:10:01 +0300 |
---|---|---|
committer | Suzanne Selhorn <sselhorn@gitlab.com> | 2022-02-08 00:10:01 +0300 |
commit | e795ae745833427e8006ded108222f1af0ea988b (patch) | |
tree | 5c349860ad78ead7ca25819b4b68856014408057 /content/assets/javascripts/docsearch.js | |
parent | f0a35e98964577964f9014eb9e5cddc3df8bf13c (diff) |
Migrate to Docsearch v3
Diffstat (limited to 'content/assets/javascripts/docsearch.js')
-rw-r--r-- | content/assets/javascripts/docsearch.js | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/content/assets/javascripts/docsearch.js b/content/assets/javascripts/docsearch.js index ac788034..088cf968 100644 --- a/content/assets/javascripts/docsearch.js +++ b/content/assets/javascripts/docsearch.js @@ -1,19 +1,14 @@ --- -version: 1 +version: 2 --- -var search = docsearch({ - apiKey: 'ce1690e1421303458a1fcbea0cc4a927', - indexName: 'gitlab', - inputSelector: '.docsearch', - algoliaOptions: { - // Filter by tags as described in https://github.com/algolia/docsearch-configs/blob/master/configs/gitlab.json - 'filters': "tags:gitlab<score=4> OR tags:omnibus<score=3> OR tags:runner<score=2> OR tags:charts<score=1>", - // Number of results shown in the search dropdown - 'hitsPerPage': 10 - }, - debug: false, // Set debug to true if you want to inspect the dropdown - autocompleteOptions: { - 'autoselect': false - } +document.addEventListener('DOMContentLoaded', () => { + // eslint-disable-next-line no-undef + docsearch({ + apiKey: '89b85ffae982a7f1adeeed4a90bb0ab1', + indexName: 'gitlab', + container: '#docsearch', + appId: "3PNCFOU757", + placeholder: 'Search the docs', + }); }); |