Skip to content

Commit fd8f3c5

Browse files
committed
revert and make search work again
1 parent 7e6cec9 commit fd8f3c5

File tree

3 files changed

+2537
-2356
lines changed

3 files changed

+2537
-2356
lines changed

js/algolia/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { html } from 'htm/preact';
22
import algoliasearch from 'algoliasearch/lite';
3-
import { autocomplete, getAlgoliaResults, highlightHit } from '@algolia/autocomplete-js';
3+
import { autocomplete, getAlgoliaHits, highlightHit } from '@algolia/autocomplete-js';
44
import {createAlgoliaInsightsPlugin} from '@algolia/autocomplete-plugin-algolia-insights';
55
import insightsClient from 'search-insights';
66

@@ -38,7 +38,7 @@ function initAutocomplete(item){
3838
return itemUrl;
3939
},
4040
getItems() {
41-
return getAlgoliaResults({
41+
return getAlgoliaHits({
4242
searchClient,
4343
queries: [
4444
{
@@ -83,4 +83,4 @@ function initAutocomplete(item){
8383

8484
}
8585

86-
locations.forEach(initAutocomplete);
86+
locations.forEach(initAutocomplete);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"scripts": {
1414
"develop": "bundle exec jekyll clean && webpack --mode production && JEKYLL_ENV=testing bundle exec jekyll build --trace -V",
1515
"develop-inc": "webpack --mode production && JEKYLL_ENV=testing bundle exec jekyll build --trace -V -I"
16-
},
16+
17+
},
1718
"devDependencies": {
1819
"@babel/cli": "^7.6.0",
1920
"@babel/core": "^7.6.0",

0 commit comments

Comments
 (0)