gatsby-starter-blog-with-lunr
gatsby-starter-blog-with-lunr copied to clipboard
Some feedback
I know you didn't ask for it but I'll write it anyway because I like your posts.
- If you press
:
in the search you get this error:
O.QueryParseError {name: "QueryParseError", message: "unrecognised field '', possible fields: 'title', 'description', 'content', 'url', 'date'"....
- Word highlighting would be nice. For example:
<p>
<Highlighter
searchWords={[query]}
autoEscape={true}
textToHighlight={description}
/>
</p>
- Clear the results when the input is cleared. Maybe something like this in the useEffect of search.js:
if (!searchQuery) setResults([])
@MarkosKon Thanks Markos, great points well made. If you'd like to help contribute then that'd be amazing, otherwise, I'll be looking into them for the next release.
I'd be happy to create a pull request for the last 2. For the first I'll have to look into it, I have no clue.
@MarkosKon Thanks a lot for your help with those two additions, solid stuff 👍. I'm going to have a look into the :
issue, I think it may need sanitising to unicodes.
I'll leave this open for the time being till I get a chance to fix that.