astro-accelerator 0.3.21 → 0.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.21",
2
+ "version": "0.3.22",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -232,7 +232,7 @@ var currentQuery = '';
232
232
  var dataUrl = qs('#site-search').dataset.sourcedata;
233
233
 
234
234
  var scoring = {
235
- depth: 2,
235
+ depth: 5,
236
236
  phraseTitle: 60,
237
237
  phraseHeading: 20,
238
238
  phraseDescription: 20,
@@ -588,6 +588,14 @@ fetch(dataUrl)
588
588
  siteSearchQuery.value = params.get('q') ?? '';
589
589
  }
590
590
 
591
+ for (let key of Object.keys(scoring)) {
592
+ if (params.has(`s_${key}`)) {
593
+ scoring[key] = parseInt(params.get(`s_${key}`) ?? scoring[key].toString(), 10) ;
594
+ }
595
+ }
596
+
597
+ console.log(scoring);
598
+
591
599
  debounceSearch();
592
600
  })
593
601
  .catch((error) => {