gatsby-starter-blog-with-lunr icon indicating copy to clipboard operation
gatsby-starter-blog-with-lunr copied to clipboard

Some feedback

Open MarkosKon opened this issue 5 years ago • 3 comments

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'"....
<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 avatar Jun 04 '19 16:06 MarkosKon

@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.

lukewhitehouse avatar Jun 04 '19 17:06 lukewhitehouse

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 avatar Jun 04 '19 17:06 MarkosKon

@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.

lukewhitehouse avatar Jun 08 '19 01:06 lukewhitehouse