Skip to content

Commit

Permalink
feat: add text search to algolia (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderleegs authored Mar 18, 2024
1 parent e9ff9cf commit 2a84ec7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions assets/js/algolia-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ search.addWidgets([
<p class="search-content description ml-9">Publish date: ${new Date(
hit.publishTimestamp
).toLocaleDateString("fr-CA")}</p>
${hit.text
? `<p class="search-content description ml-9">Content: ${instantsearch.snippet(
{
attribute: "text",
highlightedTagName: "mark",
hit,
}
)}</p>`
: ""
}
<p>
</h5>
`;
Expand Down

0 comments on commit 2a84ec7

Please sign in to comment.