diff --git a/package.json b/package.json index e279a066..2909e4a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "8.0.3", + "version": "8.1.3", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": { diff --git a/src/assets/scripts/search.js b/src/assets/scripts/search.js index 0d6ab9c5..e5d64fce 100644 --- a/src/assets/scripts/search.js +++ b/src/assets/scripts/search.js @@ -32,7 +32,7 @@ renderSearchResults(results) }) - const getSearchResults = (query) => miniSearch.search(query, {}).map(({ id }) => resultsById[id]) + const getSearchResults = (query) => miniSearch.search(query, { prefix: true, fuzzy: 0.2, boost: { title: 2 } }).map(({ id }) => resultsById[id]) const renderSearchResults = (results) => { $results.innerHTML = results.map(({ title, url }) => { return `
  • ${title}
  • `