Closed ludekcizinsky closed 1 year ago
This is a bit of a larger task, but yeah, I agree that it would be cool. Think I will only add this once relevant.
Done! The easiest solution seemed to be to add the React integration to Astro and then use a lightweight fuzzy-search framework (fuse.js in this case). Although it was slightly against my initial philosophy of using pure Astro, this seems nice.
The filtering takes into account the title
, description
, author
, tags
, format
(either blog or deep dive ai) for now.
If no fuzzy-search is inputted, all blog posts are displayed in sorted order. Upon input, filters apply. A string indicates the number of matched blog posts. The order of matched blog post is based on a computed score of similarity between post~search query.
Probably feature whose impact will be visible once we have more content, but would be nice to be able to add tags to the blog posts and also be able to filter by them on the blog post page.