Closed taojunnan closed 1 year ago
Hey @taojunnan could you please give me the steps so I can reproduce this problem here? thanks.
Hello @z3by
I have this page
If I search 123
, I want to link to http://127.0.0.1:8080/guide/#second
, not http://127.0.0.1:8080/guide/
I guess this is because the second is in the last section of the page.
@z3by sorry, I'm afraid not, I tested if hava 'third' or search abc
, same problem.
Sorry! I miss understood the problem here, in fact this feature does not exist yet, if you can submit a PR that would be great!
@z3by I think this is a necessary feature, I'm focus on this but hava no idea yet.
@taojunnan Have you made in progress on adding anchors? It appears that engines like Algolia return a anchor that is associated with the paragraph of text that was found. See below for some examples. I believe we'd have to parse the page and store it in a similar manner for Flexsearch. There is a gridsome plugin that does this I believe (https://github.com/thetre97/gridsome-plugin-flexsearch). I haven't looked into how in-depth the indexing code is.
EDIT: I'll try to make some progress if it hasn't been made yet as I need a better search feature without using Algolia.
If I search and get some result and click the result, I only can link to keyword page , how can I link to the anchor of keyword