|
10 | 10 | <script src="https://unpkg.com/tippy.js@5"></script> |
11 | 11 | {{!-- End Tooltip --}} |
12 | 12 |
|
13 | | -<script type="text/javascript" src="{{uiRootPath}}/js/vendor/search-lunr.js"></script> |
14 | | -<script type="text/javascript" src="{{uiRootPath}}/../search-index.js"></script> |
15 | 13 | <script type="text/javascript" src="{{uiRootPath}}/js/vendor/highlight.js"></script> |
16 | 14 | <script type="text/javascript" src="{{uiRootPath}}/js/vendor/clipboard.js"></script> |
17 | 15 | <script type="text/javascript" src="{{uiRootPath}}/js/vendor/tippy.js"></script> |
|
31 | 29 | } |
32 | 30 | </script> |
33 | 31 |
|
34 | | -{{!-- |
35 | | -{{#if env.ALGOLIA_API_KEY}} |
36 | | - <script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script> |
37 | | - <script> |
38 | | - function focusSearchInput () { document.querySelector('#search-input').focus() } |
39 | | - var search = docsearch({ |
40 | | - {{#if env.ALGOLIA_APP_ID}} |
41 | | - appId: '{{env.ALGOLIA_APP_ID}}', |
42 | | - {{/if}} |
43 | | - apiKey: '{{env.ALGOLIA_API_KEY}}', |
44 | | - indexName: '{{env.ALGOLIA_IDX_NAME}}', |
45 | | - inputSelector: '#search-input', |
46 | | - autocompleteOptions: { hint: false, keyboardShortcuts: ['s'] }, |
47 | | - algoliaOptions: { hitsPerPage: 10 }, |
48 | | - debug: false, |
49 | | - }).autocomplete |
50 | | - search.on('autocomplete:closed', function () { search.autocomplete.setVal() }) |
51 | | - focusSearchInput() |
52 | | - window.addEventListener('load', focusSearchInput) |
53 | | -
|
54 | | - /* |
55 | | - docsearch({ |
56 | | - // Your apiKey and indexName will be given to you once |
57 | | - // we create your config |
58 | | - apiKey: '25626fae796133dc1e734c6bcaaeac3c', |
59 | | - indexName: 'docsearch', |
60 | | - //appId: '<APP_ID>', // Should be only included if you are running DocSearch on your own. |
61 | | - // Replace inputSelector with a CSS selector |
62 | | - // matching your search input |
63 | | - inputSelector: '#search-input', |
64 | | - // Set debug to true if you want to inspect the dropdown |
65 | | - debug: false, |
66 | | - }) |
67 | | - */ |
68 | | - </script> |
| 32 | +{{#if env.SITE_SEARCH_PROVIDER}} |
| 33 | + {{> search-scripts}} |
69 | 34 | {{/if}} |
70 | | ---}} |
0 commit comments