Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'content/assets/javascripts/docsearch.js')
-rw-r--r--content/assets/javascripts/docsearch.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/content/assets/javascripts/docsearch.js b/content/assets/javascripts/docsearch.js
new file mode 100644
index 00000000..ac788034
--- /dev/null
+++ b/content/assets/javascripts/docsearch.js
@@ -0,0 +1,19 @@
+---
+version: 1
+---
+
+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
+ }
+});