diff --git a/pagefind_ui/default/_dev_files/pagefind/_pagefind_stub.ts b/pagefind_ui/default/_dev_files/pagefind/_pagefind_stub.ts index 7232a385..f94439c6 100644 --- a/pagefind_ui/default/_dev_files/pagefind/_pagefind_stub.ts +++ b/pagefind_ui/default/_dev_files/pagefind/_pagefind_stub.ts @@ -43,6 +43,7 @@ const get_subs = (term, title, url, words) => { subs.push({ title, url, + weightedLocations: [{ weight: 1, location: 1}, { weight: 2, location: 2}, { weight: 1, location: 3}], locations: [1, 2, 3], excerpt: words.slice(0, 4).join(" "), }); @@ -62,6 +63,7 @@ const get_subs = (term, title, url, words) => { title: `${i}/${sub_count}: ${get_a_word()} ${get_a_word()} ${get_a_word()}`, url: `${url}#${get_a_word()}-${i}`, locations: locs, + weightedLocations: locs.map(location => { return { weight: 1, location}}), excerpt: words .slice( @@ -102,6 +104,7 @@ const stub_results = (term): PagefindSearchResult[] => { excerpt, word_count: 30, locations: [7], + weightedLocations: [{ weight: 1, location: 7}], filters: { color: [get_a_word()], },