How to customize search to bring us closer to and highlight the searched words on the page? #1750
-
Currently, when we use the search bar to search the website built with quarto, after we click on a result, we are sent to the heading level 1 or level2 of the page where the searched word found. Here are two issues I would like to improve:
Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Did you take look at https://quarto.org/docs/websites/website-search.html, especially the section "Using Algolia" i.e., this is what https://quarto.org is using, but words do not stay highlighted (web browser search tool can help once you are on the right page)? |
Beta Was this translation helpful? Give feedback.
-
Right now, this is hard coded to break the document up at the
This, too, is not currently supported, though as with the above, feel free to open an issue and we'll see what we can do! |
Beta Was this translation helpful? Give feedback.
Right now, this is hard coded to break the document up at the
h2
level (creating a index entry at for eachh2
). There is, of course, a balance between the size the result and the number of results (too high of a heading level could result in a large number of very small results which are likely to be worse for the user). Not sure the best thing to do here, but feel free to open an issue to make this customizable and we'll give it some thought.