Skip to content

Commit

Permalink
Added date key to the search index for filtering. [Closes #3]
Browse files Browse the repository at this point in the history
  • Loading branch information
patcon committed Nov 9, 2024
1 parent 1573eec commit 422ff69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/make-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ function getData () {
}

function makeIndex (category) {
const data = category.content.map(({ index, title, description = '', tags = [], category = '' }) => ({
const data = category.content.map(({ index, title, description = '', tags = [], date, category = '' }) => ({
ref: index,
data: `${title} ${description} ${tags.join(' ')} ${category}`
data: `${title} ${description} ${tags.join(' ')} ${date} ${category}`
}))

category.index = lunr(function () {
Expand Down

0 comments on commit 422ff69

Please sign in to comment.