Wanted to know if there is any Antora extension that supports exact phrase search on Antora generated site in offline mode.
How to perform exact phrase search on a Antora generated site offline?
237 views Asked by Delta_Alpha At
1
Wanted to know if there is any Antora extension that supports exact phrase search on Antora generated site in offline mode.
To my knowledge, none currently exists.
The existing
antora-lunrextension provides code that creates an index during site generation, and useslunr.jsas the search library when browsing the generated site.lunr.jsdoes not support exact phrase search, which is where the limitation exists.To solve your problem, I'd suggest that you find a library that provide exact phrase search in an offline site, and then figure out how to create an Antora extension that builds the correct index and injects the necessary CSS/JS into the active theme.
That's no simple task, but the
antora-lunrextension demonstrates all of the non-search parts that would be required. See: https://gitlab.com/antora/antora-lunr-extensionAs for a search library, this might be a contender: https://github.com/nextapps-de/flexsearch But, since the project hasn't been updated in a while, and is incomplete, it's hard to say how much work would be involved it getting it to work.