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:
authorAchilleas Pipinellis <axil@gitlab.com>2020-10-08 09:35:09 +0300
committerdcouture <dcouture@gitlab.com>2020-10-22 17:06:33 +0300
commitf494d1179980f1c116929f7e1c7196a99b4fcc9e (patch)
tree0fb5e6e52168fff6abd439fe9a2c231abc29ecd8 /content/assets/javascripts/docsearch.js
parentc9c969789347f37ded5a9c14bbc794820ca455d1 (diff)
Add CSP headers
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
+ }
+});