[fix] algoliasearch is not defined (#542)
This commit is contained in:
parent
beb5f3d348
commit
6259ac8e98
|
@ -202,6 +202,7 @@ search:
|
|||
appId:
|
||||
apiKey:
|
||||
indexName:
|
||||
js: https://gcore.jsdelivr.net/algoliasearch/3/algoliasearch.min.js
|
||||
|
||||
|
||||
######## Comments ########
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
appId: '<%- conf.appId %>',
|
||||
apiKey: '<%- conf.apiKey %>',
|
||||
indexName: '<%- conf.indexName %>',
|
||||
js: '<%- conf.js %>',
|
||||
hitsPerPage: 100,
|
||||
};
|
||||
utils.js('https://gcore.jsdelivr.net/algoliasearch/3/algoliasearch.min.js', { defer: true });
|
||||
utils.js('/js/search/algolia-search.js', { defer: true });
|
||||
});
|
||||
</script>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
utils.js(window.searchConfig.js).then(() => {
|
||||
utils.jq(() => {
|
||||
var $inputArea = $("input#search-input");
|
||||
if ($inputArea.length === 0) {
|
||||
|
@ -73,3 +74,4 @@ utils.jq(() => {
|
|||
|
||||
observer.observe($resultArea[0], { childList: true });
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue