Search result highlighting #269
Backspaze
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to see result highlighting integrated in the FlexSearch feature. This could be managed by configuration options in the hugo.toml, as shown in the example below, with options for all, or some of the settings available, such as template, boundary, clip, etc.
This seems to have been added to FlexSearch in v0.8.0, while Lotus Docs has v0.7.31 bundled.
The theme Hextra has this feature implemented, and the search result listing would be nice to see replicated natively in Lotus Docs.
I wasn't really aware about what FlexSearch version Lotus Docs used, until I tried enabling this feature in a customized version of the theme. I just assumed that it used the latest version, which ChatGPT also did, and as I don't know JS well enough to implement this on my own, I had to rely on ChatGPT to vibe code a solution. After going around in circles for quite some time, ChatGPT suddenly came to the conclusion that Lotus Docs uses an older version that does not have the highlight feature, and proceeded with coming up with a custom solution. This works, but it can definitely be improved. If anyone is interested in this, let me know, and I'll add it here.
Example
Beta Was this translation helpful? Give feedback.
All reactions