I have not been able to debug why the HTML generated from my bookdown
- only displays the search button on Chrome (not in Firefox or Safari),
- doesn't do anything in Chrome even though CTRL-F does, and
- only searches the local page rather than the book as a whole when I use CTRL-F.
Some of the published Rmarkdown books behave differently. For instance, clicking the search icon in R for Data Science and Authoring Books with R Markdown pop up a search box in Safari above the table of contents in both Safari and Chrome, whereas CTRL-F pops up the local page search. There are no arrows with which to page through results---I need to use the up/down arrow keys on my keyboard. This behavior would be better than what I've been able to achieve, but I do not know what I need to include to make it happen.
My example is book length, but it's all on the develop
branch of the stan-dev/stan
repo on GitHub. If you clone that repo, the doc can be made with
> make doc/reference-manual/index.html
and the index will be in that location.
Edit: I tried replacing the bookdown::gitbook config with an exact copy of the one in the manual and it still didn't produce a working search button.