A collaboration initiated by Brad M, with David F and Rob B, has resulted in a
\HUGE improvement in the search capabilities of your HTML output.
The Javascript library is collected online, but then all of the search
functionality is executed in the reader's browser. We are able to tune the
search process based on the *structure* of your PreTeXt project, so this behaves
better than some generic tool. You can see examples now with the Guide, sample
article, sample book,
http://abstract.pugetsound.edu/aata/aata.html, and a few
other projects.
Subsection 43.4.9: HTML Search
https://pretextbook.org/doc/guide/html/publication-file-online.html#online-search-options
Notes:
* Presently opt-in during the soft opening. Enable with the following in the
"html" section of your publication file and rebuild HTML output.
<search variant="default"/>
* Might require the nightly build of the CLI right now. You should see a
search box in the top banner, and another pinned to the lower-right corner of
your browser window.
* In a few weeks this will become opt-out. To opt-out now, set @variant to "none".
* Using Google search *and* this native search together is not supported, you
will get warnings. If you prefer Google search, you will want to opt-out of the
new approach now (or soon).
* Speaking of Google search. We feel this new approach to search is easier to
set-up and yields better results. And the configuration of Google search keeps
changing out from under us. If you would like to be a maintainer for the Google
search feature, please volunteer on pretext-dev for onboarding. Otherwise, I
think this feature is going to rot away like an abandoned house consumed by
blackberry vines.
* Presently highly-tuned for textbooks. I think there is room for an alternate
tuning for reference works and research articles. (One, or two different ones?)
So that explains why @variant is just "none" and "default" right now.
* Critiques of performance and presentation of results to discussion on
pretext-dev and any bugs/issues to pretext-support, please. Or wherever you
are most comfortable. ;-)
Kudos to David and Brad for their work on this! We've wanted this for a long time.
Rob